Fixed: Set permissions on extra and subtitle files

pull/1689/head
Mark McDowall 5 years ago committed by Qstick
parent 10b7d0d63e
commit 8c657ddb24

@ -15,16 +15,19 @@ namespace NzbDrone.Core.Extras.Lyrics
public class LyricService : ExtraFileManager<LyricFile>
{
private readonly ILyricFileService _lyricFileService;
private readonly IMediaFileAttributeService _mediaFileAttributeService;
private readonly Logger _logger;
public LyricService(IConfigService configService,
IDiskProvider diskProvider,
IDiskTransferService diskTransferService,
ILyricFileService lyricFileService,
IMediaFileAttributeService mediaFileAttributeService,
Logger logger)
: base(configService, diskProvider, diskTransferService, logger)
{
_lyricFileService = lyricFileService;
_mediaFileAttributeService = mediaFileAttributeService;
_logger = logger;
}
@ -88,6 +91,7 @@ namespace NzbDrone.Core.Extras.Lyrics
var suffix = GetSuffix(1, false);
var subtitleFile = ImportFile(artist, trackFile, path, readOnly, extension, suffix);
_mediaFileAttributeService.SetFilePermissions(path);
_lyricFileService.Upsert(subtitleFile);
return subtitleFile;

@ -13,15 +13,18 @@ namespace NzbDrone.Core.Extras.Others
public class OtherExtraService : ExtraFileManager<OtherExtraFile>
{
private readonly IOtherExtraFileService _otherExtraFileService;
private readonly IMediaFileAttributeService _mediaFileAttributeService;
public OtherExtraService(IConfigService configService,
IDiskProvider diskProvider,
IDiskTransferService diskTransferService,
IOtherExtraFileService otherExtraFileService,
IMediaFileAttributeService mediaFileAttributeService,
Logger logger)
: base(configService, diskProvider, diskTransferService, logger)
{
_otherExtraFileService = otherExtraFileService;
_mediaFileAttributeService = mediaFileAttributeService;
}
public override int Order => 2;
@ -65,6 +68,7 @@ namespace NzbDrone.Core.Extras.Others
{
var extraFile = ImportFile(artist, trackFile, path, readOnly, extension, null);
_mediaFileAttributeService.SetFilePermissions(path);
_otherExtraFileService.Upsert(extraFile);
return extraFile;

Loading…
Cancel
Save