mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
GetEpisodesByParseResult will properly handle Daily episodes.
This commit is contained in:
parent
1317b8fbef
commit
38790e9f9c
3 changed files with 106 additions and 0 deletions
|
@ -125,6 +125,30 @@ namespace NzbDrone.Core.Providers
|
|||
{
|
||||
var result = new List<Episode>();
|
||||
|
||||
if (parseResult.AirDate.HasValue)
|
||||
{
|
||||
var episodeInfo = GetEpisode(parseResult.Series.SeriesId, parseResult.AirDate.Value);
|
||||
|
||||
//if still null we should add the temp episode
|
||||
if (episodeInfo == null && autoAddNew)
|
||||
{
|
||||
Logger.Debug("Episode {0} doesn't exist in db. adding it now.", parseResult);
|
||||
episodeInfo = new Episode
|
||||
{
|
||||
SeriesId = parseResult.Series.SeriesId,
|
||||
AirDate = parseResult.AirDate.Value,
|
||||
Title = "TBD",
|
||||
Overview = String.Empty,
|
||||
};
|
||||
|
||||
AddEpisode(episodeInfo);
|
||||
}
|
||||
|
||||
//Add to Result and Return (There will only be one episode to return)
|
||||
result.Add(episodeInfo);
|
||||
return result;
|
||||
}
|
||||
|
||||
if (parseResult.EpisodeNumbers == null)
|
||||
return result;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue