mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
cleaned up parsing logic and structure.
This commit is contained in:
parent
cd2761d07d
commit
6e88f55a54
120 changed files with 2149 additions and 3064 deletions
|
@ -59,7 +59,7 @@ namespace NzbDrone.Core.MediaFiles
|
|||
return null;
|
||||
}
|
||||
|
||||
_diskProvider.CreateDirectory(new FileInfo(newFile).DirectoryName);
|
||||
_diskProvider.CreateFolder(new FileInfo(newFile).DirectoryName);
|
||||
|
||||
_logger.Debug("Moving [{0}] > [{1}]", episodeFile.Path, newFile);
|
||||
_diskProvider.MoveFile(episodeFile.Path, newFile);
|
||||
|
@ -78,14 +78,12 @@ namespace NzbDrone.Core.MediaFiles
|
|||
episodeFile.Path = newFile;
|
||||
_mediaFileService.Update(episodeFile);
|
||||
|
||||
var parseResult = Parser.ParsePath(episodeFile.Path);
|
||||
parseResult.Series = series;
|
||||
var parseResult = Parser.Parser.ParsePath(episodeFile.Path);
|
||||
parseResult.Quality = episodeFile.Quality;
|
||||
parseResult.Episodes = episodes;
|
||||
|
||||
if (newDownload)
|
||||
{
|
||||
_eventAggregator.Publish(new EpisodeDownloadedEvent(parseResult));
|
||||
_eventAggregator.Publish(new EpisodeDownloadedEvent(parseResult, series));
|
||||
}
|
||||
|
||||
return episodeFile;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue