mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 04:22:30 +01:00
Revert "Fixed: Sort episodes on the api by episode number when they air at the same time."
This reverts commit 9ffc0ec521
.
This commit is contained in:
parent
f2784d3ec2
commit
e6ab4196de
@ -51,7 +51,7 @@ private Response GetCalendarFeed()
|
|||||||
var episodes = _episodeService.EpisodesBetweenDates(start, end, false);
|
var episodes = _episodeService.EpisodesBetweenDates(start, end, false);
|
||||||
var icalCalendar = new iCalendar();
|
var icalCalendar = new iCalendar();
|
||||||
|
|
||||||
foreach (var episode in episodes)
|
foreach (var episode in episodes.OrderBy(v => v.AirDateUtc.Value))
|
||||||
{
|
{
|
||||||
var occurrence = icalCalendar.Create<Event>();
|
var occurrence = icalCalendar.Create<Event>();
|
||||||
occurrence.UID = "NzbDrone_episode_" + episode.Id.ToString();
|
occurrence.UID = "NzbDrone_episode_" + episode.Id.ToString();
|
||||||
|
@ -35,7 +35,7 @@ private List<EpisodeResource> GetCalendar()
|
|||||||
|
|
||||||
var resources = ToListResource(() => _episodeService.EpisodesBetweenDates(start, end, includeUnmonitored));
|
var resources = ToListResource(() => _episodeService.EpisodesBetweenDates(start, end, includeUnmonitored));
|
||||||
|
|
||||||
return resources;
|
return resources.OrderBy(e => e.AirDateUtc).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,15 +79,8 @@ protected override List<EpisodeResource> ToListResource<TModel>(IEnumerable<TMod
|
|||||||
{
|
{
|
||||||
var resources = base.ToListResource(modelList);
|
var resources = base.ToListResource(modelList);
|
||||||
|
|
||||||
var withSeries = LoadSeries(resources);
|
return LoadSeries(resources);
|
||||||
|
|
||||||
return withSeries.OrderByDescending(e => e.AirDateUtc.HasValue)
|
|
||||||
.ThenBy(e => e.AirDateUtc.Value)
|
|
||||||
.ThenBy(e => e.SeriesTitle)
|
|
||||||
.ThenByDescending(e => e.SeasonNumber != 0)
|
|
||||||
.ThenBy(e => e.SeasonNumber)
|
|
||||||
.ThenBy(e => e.EpisodeNumber)
|
|
||||||
.ToList();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Handle(EpisodeGrabbedEvent message)
|
public void Handle(EpisodeGrabbedEvent message)
|
||||||
|
Loading…
Reference in New Issue
Block a user