mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +02:00
Fixed: Nested Folder in MovieFolder Naming not created automatically
This commit is contained in:
parent
897bfa04a6
commit
a591227052
@ -11,6 +11,7 @@
|
||||
using NzbDrone.Core.Movies;
|
||||
using NzbDrone.Core.Organizer;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
using NzbDrone.Core.RootFolders;
|
||||
|
||||
namespace NzbDrone.Core.MediaFiles
|
||||
{
|
||||
@ -30,6 +31,7 @@ public class MovieFileMovingService : IMoveMovieFiles
|
||||
private readonly IMediaFileAttributeService _mediaFileAttributeService;
|
||||
private readonly IEventAggregator _eventAggregator;
|
||||
private readonly IConfigService _configService;
|
||||
private readonly IRootFolderService _rootFolderService;
|
||||
private readonly Logger _logger;
|
||||
|
||||
public MovieFileMovingService(IUpdateMovieFileService updateMovieFileService,
|
||||
@ -39,6 +41,7 @@ public MovieFileMovingService(IUpdateMovieFileService updateMovieFileService,
|
||||
IMediaFileAttributeService mediaFileAttributeService,
|
||||
IEventAggregator eventAggregator,
|
||||
IConfigService configService,
|
||||
IRootFolderService rootFolderService,
|
||||
Logger logger)
|
||||
{
|
||||
_updateMovieFileService = updateMovieFileService;
|
||||
@ -48,6 +51,7 @@ public MovieFileMovingService(IUpdateMovieFileService updateMovieFileService,
|
||||
_mediaFileAttributeService = mediaFileAttributeService;
|
||||
_eventAggregator = eventAggregator;
|
||||
_configService = configService;
|
||||
_rootFolderService = rootFolderService;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
@ -140,7 +144,7 @@ private void EnsureMovieFolder(MovieFile movieFile, Movie movie, string filePath
|
||||
var movieFileFolder = Path.GetDirectoryName(filePath);
|
||||
|
||||
var movieFolder = movie.Path;
|
||||
var rootFolder = new OsPath(movieFolder).Directory.FullPath;
|
||||
var rootFolder = _rootFolderService.GetBestRootFolderPath(movieFolder);
|
||||
|
||||
if (!_diskProvider.FolderExists(rootFolder))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user