Fixed: Nested Folder in MovieFolder Naming not created automatically

pull/5346/head
Qstick 4 years ago
parent 897bfa04a6
commit a591227052

@ -11,6 +11,7 @@ using NzbDrone.Core.Messaging.Events;
using NzbDrone.Core.Movies; using NzbDrone.Core.Movies;
using NzbDrone.Core.Organizer; using NzbDrone.Core.Organizer;
using NzbDrone.Core.Parser.Model; using NzbDrone.Core.Parser.Model;
using NzbDrone.Core.RootFolders;
namespace NzbDrone.Core.MediaFiles namespace NzbDrone.Core.MediaFiles
{ {
@ -30,6 +31,7 @@ namespace NzbDrone.Core.MediaFiles
private readonly IMediaFileAttributeService _mediaFileAttributeService; private readonly IMediaFileAttributeService _mediaFileAttributeService;
private readonly IEventAggregator _eventAggregator; private readonly IEventAggregator _eventAggregator;
private readonly IConfigService _configService; private readonly IConfigService _configService;
private readonly IRootFolderService _rootFolderService;
private readonly Logger _logger; private readonly Logger _logger;
public MovieFileMovingService(IUpdateMovieFileService updateMovieFileService, public MovieFileMovingService(IUpdateMovieFileService updateMovieFileService,
@ -39,6 +41,7 @@ namespace NzbDrone.Core.MediaFiles
IMediaFileAttributeService mediaFileAttributeService, IMediaFileAttributeService mediaFileAttributeService,
IEventAggregator eventAggregator, IEventAggregator eventAggregator,
IConfigService configService, IConfigService configService,
IRootFolderService rootFolderService,
Logger logger) Logger logger)
{ {
_updateMovieFileService = updateMovieFileService; _updateMovieFileService = updateMovieFileService;
@ -48,6 +51,7 @@ namespace NzbDrone.Core.MediaFiles
_mediaFileAttributeService = mediaFileAttributeService; _mediaFileAttributeService = mediaFileAttributeService;
_eventAggregator = eventAggregator; _eventAggregator = eventAggregator;
_configService = configService; _configService = configService;
_rootFolderService = rootFolderService;
_logger = logger; _logger = logger;
} }
@ -140,7 +144,7 @@ namespace NzbDrone.Core.MediaFiles
var movieFileFolder = Path.GetDirectoryName(filePath); var movieFileFolder = Path.GetDirectoryName(filePath);
var movieFolder = movie.Path; var movieFolder = movie.Path;
var rootFolder = new OsPath(movieFolder).Directory.FullPath; var rootFolder = _rootFolderService.GetBestRootFolderPath(movieFolder);
if (!_diskProvider.FolderExists(rootFolder)) if (!_diskProvider.FolderExists(rootFolder))
{ {

Loading…
Cancel
Save