Kodi Community Forum

Full Version: Strange behavior with video library runtime
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am noticing something weird with video runtimes. When I use Ember Media Manager to create a nfo file and then scan that file into the library, it takes the value in the <runtime> tag of the nfo file (which is in seconds) and multiplies it by 60 and enter that into the db. For example, if the runtime in the nfo is 1440, then XBMC enter 86400 in the db. In spite of that, the correct duration is displayed when viewing the video ifo in the GUI. Why is this and can I stop it?
Anyone?
XBMC will update runtime and some other info every time it reads the video file. I'm not sure why you would want it to display the incorrect info.
I'm sorry. I wasn't clear enough. I do not want it to display the wrong time. I'm saying the db is storing the wrong time. If the file is actually 1440 seconds long and that is also the data that is in the nfo file, when scanned into the library, XBMC stores 864000 in the db (instead of 1440). It is multiplying the actual run time by 60. It's like it is expecting the time to be in minutes and it multiplying it by 60 to convert it to seconds. Somehow though the correct time is shown in XBMC under the episode info.

I am trying to figure out why it is doing that and if it's possible to correct it.
ah, I see. I think
If it displays correctly in XBMC, what is the problem?
The problem is that the addon Pseudo TV uses a video's runtime to populate it's EPG and it's getting it from the db. Because of this problem, PTV shows hundreds of episodes as lasting approximately 24 hours. When, in fact, they are really about 22-24 minutes long.

I just don't understand why XBMC is altering the runtime when they are scanned in to the library.
If Ember is putting the runtime in seconds, it appears to be doing the wring thing, because the wiki says that the nfo file should have the runtime in minutes.

http://wiki.xbmc.org/index.php?title=NFO...g_XML_data

I think there is a thread here somewhere for Ember.
Thanks for that! That explains it. Although I don't understand why XBMC wants the info in minutes in the nfo file but then records it as seconds in the db. Why do the conversion? Plus it would be more accurate if XBMC allowed the format to be in seconds in the nfo and just recorded it as such.

If a video is 23:52, Ember rounds down to 23 minutes in the nfo, the info stored in the db is off by 52 seconds. Seems goofy to me, but maybe there's a reason for it I'm not seeing.
I think the reason might be historic, and the database has been prepared to eventually be able to record seconds in it as well.