mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-24 11:06:56 +00:00
fix library scan stopping and restarting itself
This commit is contained in:
@@ -35,7 +35,14 @@ namespace MediaBrowser.Server.Implementations.Sorting
|
||||
|
||||
if (x.ProductionYear.HasValue)
|
||||
{
|
||||
return new DateTime(x.ProductionYear.Value, 1, 1, 0, 0, 0, DateTimeKind.Utc);
|
||||
try
|
||||
{
|
||||
return new DateTime(x.ProductionYear.Value, 1, 1, 0, 0, 0, DateTimeKind.Utc);
|
||||
}
|
||||
catch (ArgumentOutOfRangeException)
|
||||
{
|
||||
// Don't blow up if the item has a bad ProductionYear, just return MinValue
|
||||
}
|
||||
}
|
||||
return DateTime.MinValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user