Added ParsedEpisodeInfo to LocalEpisode

pull/4/head
Mark McDowall 12 years ago
parent 98e94643fb
commit 21656ecc39

@ -61,9 +61,7 @@ namespace NzbDrone.Core.MediaFiles
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 @@ namespace NzbDrone.Core.Parser.Model
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 @@ namespace NzbDrone.Core.Parser
Series = series,
Quality = parsedEpisodeInfo.Quality,
Episodes = episodes,
Path = fileName
Path = fileName,
ParsedEpisodeInfo = parsedEpisodeInfo
};
}

Loading…
Cancel
Save