mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-02 08:23:04 +00:00
fixed year selection issue
This commit is contained in:
@@ -110,7 +110,8 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
var itemsList = items.Where(i => i.ProductionYear != null).ToList();
|
||||
|
||||
return itemsList
|
||||
.Select(i => i.ProductionYear.Value)
|
||||
.Select(i => i.ProductionYear ?? 0)
|
||||
.Where(i => i > 0)
|
||||
.Distinct()
|
||||
.Select(year => LibraryManager.GetYear(year));
|
||||
}
|
||||
|
||||
@@ -703,7 +703,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
{
|
||||
if (value <= 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
throw new ArgumentOutOfRangeException("Years less than or equal to 0 are invalid.");
|
||||
}
|
||||
|
||||
return GetItemByName<Year>(ConfigurationManager.ApplicationPaths.YearPath, value.ToString(UsCulture));
|
||||
|
||||
Reference in New Issue
Block a user