Remove unnecessary sanity check
This commit is contained in:
parent
7ba53548a2
commit
a015caba3f
|
@ -86,17 +86,9 @@ namespace MediaBrowser.XbmcMetadata.Parsers
|
|||
{
|
||||
reader.MoveToContent();
|
||||
|
||||
if (reader.ReadToDescendant("episode"))
|
||||
if (reader.ReadToDescendant("episode") && int.TryParse(reader.ReadElementContentAsString(), out var num))
|
||||
{
|
||||
var number = reader.ReadElementContentAsString();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(number))
|
||||
{
|
||||
if (int.TryParse(number, out var num))
|
||||
{
|
||||
item.Item.IndexNumberEnd = Math.Max(num, item.Item.IndexNumberEnd ?? num);
|
||||
}
|
||||
}
|
||||
item.Item.IndexNumberEnd = Math.Max(num, item.Item.IndexNumberEnd ?? num);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user