2009-12-29, 00:57
I see, OK, then would it be possible to take the output of the scraper and load it somehow into XBMC or am I far off track here?
ssimon Wrote:I see, OK, then would it be possible to take the output of the scraper and load it somehow into XBMC or am I far off track here?
smeehrrr Wrote:Is the current code in SVN supposed to be functional? I'm noticing that when scraping movies the only fields that get set are the ones explicitly set in MovieTag.Deserialize, which doesn't include basic things like Title. The changes I made for the VideoTag class look like they've been removed and replaced with something that I don't understand. How is title supposed to get set in the current code?
internal double ProcessRating(XElement ratingElement)
{
if (ratingElement != null)
{
NumberFormatInfo provider = new NumberFormatInfo();
provider.NumberDecimalSeparator = ".";
provider.NumberGroupSeparator = ",";
provider.NumberGroupSizes = new int[] { 3 };
if (ratingElement.Attribute("max") != null)
{
double scale = 10.0 / Convert.ToDouble(ratingElement.Attribute("max").Value,provider);
return scale * Convert.ToDouble(ratingElement.Value,provider);
}
else
{
return Convert.ToDouble(ratingElement.Value,provider);
}
}
return 0.0;
}