mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-27 10:07:10 +00:00
Added ParsedEpisodeInfo to LocalEpisode
This commit is contained in:
parent
98e94643fb
commit
21656ecc39
3 changed files with 7 additions and 6 deletions
|
@ -61,9 +61,7 @@ public EpisodeFile MoveEpisodeFile(EpisodeFile episodeFile, LocalEpisode localEp
|
|||
var destinationFilename = _buildFileNames.BuildFilePath(localEpisode.Series, localEpisode.SeasonNumber, newFileName, Path.GetExtension(episodeFile.Path));
|
||||
episodeFile = MoveFile(episodeFile, destinationFilename);
|
||||
|
||||
//TODO: This just re-parses the source path (which is how we got localEpisode to begin with)
|
||||
var parsedEpisodeInfo = Parser.Parser.ParsePath(localEpisode.Path);
|
||||
_messageAggregator.PublishEvent(new EpisodeDownloadedEvent(parsedEpisodeInfo, localEpisode.Series));
|
||||
_messageAggregator.PublishEvent(new EpisodeDownloadedEvent(localEpisode.ParsedEpisodeInfo, localEpisode.Series));
|
||||
|
||||
return episodeFile;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,10 @@ namespace NzbDrone.Core.Parser.Model
|
|||
{
|
||||
public class LocalEpisode
|
||||
{
|
||||
public string Path { get; set; }
|
||||
|
||||
public ParsedEpisodeInfo ParsedEpisodeInfo { get; set; }
|
||||
|
||||
public Series Series { get; set; }
|
||||
|
||||
public List<Episode> Episodes { get; set; }
|
||||
|
@ -13,7 +17,5 @@ public class LocalEpisode
|
|||
public QualityModel Quality { get; set; }
|
||||
|
||||
public int SeasonNumber { get { return Episodes.Select(c => c.SeasonNumber).Distinct().Single(); } }
|
||||
|
||||
public string Path { get; set; }
|
||||
}
|
||||
}
|
|
@ -47,7 +47,8 @@ public LocalEpisode GetEpisodes(string fileName, Series series)
|
|||
Series = series,
|
||||
Quality = parsedEpisodeInfo.Quality,
|
||||
Episodes = episodes,
|
||||
Path = fileName
|
||||
Path = fileName,
|
||||
ParsedEpisodeInfo = parsedEpisodeInfo
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue