Sorting seasons on show query

This commit is contained in:
Zoe Roux 2020-02-10 23:02:17 +01:00
parent 29ed7dfa0a
commit f318d66efe

View File

@ -76,7 +76,10 @@ namespace Kyoo.Controllers
public Show GetShowBySlug(string slug)
{
return (from show in _database.Shows where show.Slug == slug select show).FirstOrDefault();
Show ret = (from show in _database.Shows where show.Slug == slug select show).FirstOrDefault();
if (ret != null)
ret.Seasons = ret.Seasons.OrderBy(x => x.SeasonNumber);
return ret;
}
public Show GetShow(string path)