mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 12:32:31 +01:00
Added ParsedEpisodeInfo to LocalEpisode
This commit is contained in:
parent
98e94643fb
commit
21656ecc39
@ -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 New Issue
Block a user