mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-23 15:30:56 -04:00
parse budget and revenue from xml
This commit is contained in:
parent
840b1cb3d9
commit
a55e151054
@ -1,4 +1,5 @@
|
|||||||
using MediaBrowser.Controller.Entities;
|
using System.Globalization;
|
||||||
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Logging;
|
using MediaBrowser.Model.Logging;
|
||||||
using System;
|
using System;
|
||||||
@ -75,6 +76,8 @@ namespace MediaBrowser.Controller.Providers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fetches metadata from one Xml Element
|
/// Fetches metadata from one Xml Element
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -106,6 +109,28 @@ namespace MediaBrowser.Controller.Providers
|
|||||||
item.DisplayMediaType = type;
|
item.DisplayMediaType = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "Budget":
|
||||||
|
{
|
||||||
|
var text = reader.ReadElementContentAsString();
|
||||||
|
double value;
|
||||||
|
if (double.TryParse(text, NumberStyles.Any, _usCulture, out value))
|
||||||
|
{
|
||||||
|
item.Budget = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "Revenue":
|
||||||
|
{
|
||||||
|
var text = reader.ReadElementContentAsString();
|
||||||
|
double value;
|
||||||
|
if (double.TryParse(text, NumberStyles.Any, _usCulture, out value))
|
||||||
|
{
|
||||||
|
item.Revenue = value;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "SortTitle":
|
case "SortTitle":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user