mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Remove unnecessary sanity check
This commit is contained in:
parent
7ba53548a2
commit
a015caba3f
@ -86,17 +86,9 @@ namespace MediaBrowser.XbmcMetadata.Parsers
|
|||||||
{
|
{
|
||||||
reader.MoveToContent();
|
reader.MoveToContent();
|
||||||
|
|
||||||
if (reader.ReadToDescendant("episode"))
|
if (reader.ReadToDescendant("episode") && int.TryParse(reader.ReadElementContentAsString(), out var num))
|
||||||
{
|
{
|
||||||
var number = reader.ReadElementContentAsString();
|
item.Item.IndexNumberEnd = Math.Max(num, item.Item.IndexNumberEnd ?? num);
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(number))
|
|
||||||
{
|
|
||||||
if (int.TryParse(number, out var num))
|
|
||||||
{
|
|
||||||
item.Item.IndexNumberEnd = Math.Max(num, item.Item.IndexNumberEnd ?? num);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user