2015-01-23, 20:46
I'm attempting to create a smart playlist that will give me some random less-watched Star Trek episode from my collection (or possibly other shows, if grouping by TV show was possible), which not necessarily has to be in episode number.
However, I'm having trouble setting up the playlist... I'm starting to think that it's not possible to do such thing in vanilla Kodi (would it be possible through an add-on? is this a bug to fix?).
This is my xsp file:
It doesn't work.. I keep getting the episodes ordered by episode number. And not only that, it will also show all Star Trek TOS first, and only after them will it show Star Trek TNG.. no matter if my playcount for TNG series is higher, it will simply show it all in order of tvshow and then episode.
The only thing that seems to be doing well is the filtering rule, only TV Shows with "Star Trek" in the title are shown.
EDIT: This is the debug log output:
Not very helpful, though. The query doesn't contain any "SORT BY" ... but I think it's because kodi does the sorting on its own (I see there's a SortUtils.cpp in the sourcecode).. but right now I'm in no condition to wrap my head around it... maybe tomorrow I will try to have a look at it, if somebody can confirm me this is a bug in Kodi.
However, I'm having trouble setting up the playlist... I'm starting to think that it's not possible to do such thing in vanilla Kodi (would it be possible through an add-on? is this a bug to fix?).
This is my xsp file:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="episodes">
<name>Less watched episodes</name>
<match>all</match>
<rule field="tvshow" operator="contains">
<value>Star Trek</value>
</rule>
<order direction="ascending">playcount</order>
</smartplaylist>
It doesn't work.. I keep getting the episodes ordered by episode number. And not only that, it will also show all Star Trek TOS first, and only after them will it show Star Trek TNG.. no matter if my playcount for TNG series is higher, it will simply show it all in order of tvshow and then episode.
The only thing that seems to be doing well is the filtering rule, only TV Shows with "Star Trek" in the title are shown.
EDIT: This is the debug log output:
Code:
20:41:04 T:1164 DEBUG: CGUIMediaWindow::GetDirectory (special://profile/playlists/video/Less watched episodes.xsp)
20:41:04 T:1164 DEBUG: ParentPath = [special://videoplaylists/]
20:41:04 T:1164 DEBUG: CVideoDatabase::RunQuery took 8 ms for 255 items query: select * from episodeview WHERE ((episodeview.strTitle LIKE '%Star Trek%'))
20:41:04 T:7268 NOTICE: Thread BackgroundLoader start, auto delete: false
20:41:04 T:7268 DEBUG: Thread BackgroundLoader 7268 terminating
20:41:04 T:1164 DEBUG: Keyboard: scancode: 0x38, sym: 0x0134, unicode: 0x0000, modifier: 0x100
Not very helpful, though. The query doesn't contain any "SORT BY" ... but I think it's because kodi does the sorting on its own (I see there's a SortUtils.cpp in the sourcecode).. but right now I'm in no condition to wrap my head around it... maybe tomorrow I will try to have a look at it, if somebody can confirm me this is a bug in Kodi.