Kodi Community Forum
Understanding scraping and .nfo files - Duration - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Understanding scraping and .nfo files - Duration (/showthread.php?tid=186600)



Understanding scraping and .nfo files - Duration - litfoo - 2014-02-17

Hi all,

I was looking for some advice please:

I currently add videos to my 'Movies' library using 'The MovieDB' scraper

My duration of movie in nfo is displayed as '1hr 35m' - however in XBMC it is displayed as 95mins - any idea why this happening? can i change it so that duration is displayed in 'hrs mins' format on mediainfo pages

Many thanks in advance,

litfoo


RE: Understanding scraping and .nfo files - Duration - Prof Yaffle - 2014-02-17

Maybe a skin-specific way of interpreting and displaying the value?

The NFO value simply seeds the database when you scan it... I think XBMC will then determine for itself how long something really is. You could test this by importing dubious information (e.g. 10 minutes) and then re-exporting.


RE: Understanding scraping and .nfo files - Duration - litfoo - 2014-02-17

(2014-02-17, 13:10)Prof Yaffle Wrote: Maybe a skin-specific way of interpreting and displaying the value?

The NFO value simply seeds the database when you scan it... I think XBMC will then determine for itself how long something really is. You could test this by importing dubious information (e.g. 10 minutes) and then re-exporting.

Thanks for the reply. True, it could be the skin

Am using both Aeon Nox and Aeon MQ5 and they both show in minutes as opposed to hr mins as in nfo

when you say import - you mean edit my .nfo to a dummy value?

and export - you mean update library?


RE: Understanding scraping and .nfo files - Duration - Prof Yaffle - 2014-02-17

Import - if an NFO exists when you scrape or refresh something, it will be used in preference to getting new information from the internet.

Export - you can export your entire library to individual files - probably overkill to test this - but that creates NFOs that include the current database entries for each item in your library, including CODEC, watched status, certificate, duration, etc. - basically, everything XBMC knows about a file.


RE: Understanding scraping and .nfo files - Duration - litfoo - 2014-02-17

Apparently it is in the software coding itself


RE: Understanding scraping and .nfo files - Duration - prae5 - 2014-02-17

I might be mistaken, but i think we only store the duration in minutes and thats whats presented to the skin.


RE: Understanding scraping and .nfo files - Duration - litfoo - 2014-02-17

(2014-02-17, 18:08)prae5 Wrote: I might be mistaken, but i think we only store the duration in minutes and thats whats presented to the skin.

Thanks - shame though as I would like to display in Hrs mins


RE: Understanding scraping and .nfo files - Duration - Prof Yaffle - 2014-02-17

I dug into the skin code for Aeon and Confluence... there doesn't appear to be any manipulation of values, the skins simply display them as per your selected localisation. Given that the skins are XML, I'm not even sure whether it would be possible to do the sort of calculation that would be needed to convert a time value unless there's something that can be added to that localisation code, as is presumably the case for the C/F conversion for temperature.


RE: Understanding scraping and .nfo files - Duration - litfoo - 2014-02-17

Thanks for the info and digging into the code Prof Yaffle


RE: Understanding scraping and .nfo files - Duration - Kib - 2014-02-17

It is possible the skin can present it as hours and minutes but it would need a manual edit.

I am just not sure it the listitem supports parsing it to (hh:mm) but I will check when I am home.


RE: Understanding scraping and .nfo files - Duration - litfoo - 2014-02-17

(2014-02-17, 19:02)Kib Wrote: It is possible the skin can present it as hours and minutes but it would need a manual edit.

I am just not sure it the listitem supports parsing it to (hh:mm) but I will check when I am home.

Oh wow - a glimmer of hope.

thanks again - am using primarily Aeon MQ5 at present and occasionally Aeon Nox


RE: Understanding scraping and .nfo files - Duration - Kib - 2014-02-17

I am sorry but it can't be done currently. (I tried in a few ways)

The duration is stored in the database as minutes and can be retrieved with
Code:
$Info[ListItem.Duration]

This however returns the code in minutes, and is not possible to convert it within the skin to show hours and minutes.

References:
http://forum.xbmc.org/showthread.php?tid=75036&page=2
http://forum.xbmc.org/showthread.php?tid=80304
http://forum.xbmc.org/showthread.php?tid=105084


RE: Understanding scraping and .nfo files - Duration - litfoo - 2014-02-17

Thanks again Kib for looking into it further