Kodi Community Forum

Full Version: XBMC 13 movie smart playlist duration (time)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Was doing some work creating smart playlists for movies (using SQLite db). When creating a rule for duration (time) the UI validates the field entry value to a max of 59:59 (59 minutes / 59 secs). Looking at some tickets from back in Eden, I think maybe the SQLite video database for movies was changed and the attribute for duration (c11) is now stored as seconds. In the past I guess maybe this was minutes back in Eden time-frame so having the duration validated as hh:mm maybe made sense.

I did a test by editing the smart playlist xsb file to have the duration rule in format hh:mm : ss

Code:
<rule field="time" operator="lessthan">
        <value>01:30:00</value>
    </rule>

and it worked fine (confirmed in log)
Code:
13:34:57 T:1708   DEBUG: CGUIMediaWindow::GetDirectory (special://profile/playlists/video/duration.xsp)
13:34:57 T:1708   DEBUG:   ParentPath = [special://videoplaylists/]
13:34:57 T:1708   DEBUG: CVideoDatabase::RunQuery took 1 ms for 38 items query: select * from movieview  WHERE ((CAST(movieview.c11 as INTEGER) < 5400))
(01:30:00 = 5400 secs) so the issue seems to be only in the UI.

scott s.
.
So it should be HH:MM:SS. Will take a look if someone doesn't beat me to it.
Turns out it's not completely trivial:

https://github.com/xbmc/xbmc/pull/4675

Cheers,
Jonathan