Sort order problem with filling a list from library
#1
I'm using <content target="video">videodb://movies/titles/</content> to fill a list but for some reason the order my movies are displayed in isn't the same as when you enter them using the same path <onclick>ActivateWindow(Videos,videodb://movies/titles/,return)</onclick>. It seems to list my kids movies first and then my main movies after because they were added separately.

Is this expected behaviour? If so, is there any way to order the list?

Thanks.
Reply
#2
i think it is expected behavior or at least "not controlled" behavior.

first thing that comes to mind is create a playlist of every movie sorted by title (sort title)
and then use that to populate the content.

just a workaround though...

edit : i use this a lot, make playlist, move it to skin folder and fill content with special://skin/resources/foo.xsp
maybe i'm saying something obvious..but just thought i'll post it.

cheers.

BTW: nice work on ftv
Image Image
Did I Help? Add to my reputation
Reply
#3
Yeah, I've actually been testing nodes vs library vs playlists and library is the quickest way to fill a list but unfortunately it's not ordered correctly.

From the tests -

library > nodes > playlists

so I'd probably have to go with nodes.

Thanks.
Reply
#4
what do you mean by nodes?
Image Image
Did I Help? Add to my reputation
Reply
#5
Time ago i've posted having troubles with sorting:

<content target="video">videodb://tvshows/years/</content>

See here: http://forum.kodi.tv/showthread.php?tid=...pid1638954
Reply
#6
Yeah this is "expected" behaviour from a core code point of view. Using the same path as in an ActivateWindow() call does not mean that it goes through the same logic. It simply retrieves the same list of items but the ActivateWindow() call also routes those items through the media window logic which has additional info for every path (either default values or whatever the user has defined last time it was looking at that list) and is therefore capable of sorting it.

Maybe the <content> tag needs to be expanded to support sorting.

@Hitcher: Depending on the node definitions they are either "library" or "playlist" so in some cases they should be more or less identical to library paths and in others they should be more or less identical to playlists.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#7
I think the problem is that those results aren't ordered if not in the video page, so they get read as the are written in the database.. first come first serve...

i guess.

edit if I read the post Montellese just did I would have never posted this.. Sad

(2014-11-14, 14:47)Montellese Wrote: Maybe the <content> tag needs to be expanded to support sorting.

what about sorting & filtering ?

Tongue
Image Image
Did I Help? Add to my reputation
Reply
#8
(2014-11-14, 14:47)Montellese Wrote: Maybe the <content> tag needs to be expanded to support sorting.
The content tag needs a lot of stuff to be added. I wish i could code C+ or had the time to learn Sad
Let's hope Black will add some of them.Wink

Cheers
Nessus
Reply
#9
Video showing the loading speeds (refreshed at the end to show it again) and also the loading of thumbs when entering the video library.



As you can see there's some delay in loading thumbs when entering the video library directly on my Windows PC but there's actually no delay on my Fire TV.
Reply
#10
(2014-11-14, 14:47)Montellese Wrote: Yeah this is "expected" behaviour from a core code point of view. Using the same path as in an ActivateWindow() call does not mean that it goes through the same logic. It simply retrieves the same list of items but the ActivateWindow() call also routes those items through the media window logic which has additional info for every path (either default values or whatever the user has defined last time it was looking at that list) and is therefore capable of sorting it.

Maybe the <content> tag needs to be expanded to support sorting.

I've also found that it messes with playlists as well.
I made one to list movies in ascending order of rating but when loaded as content it's listed in descending order.

Should this be reported as a bug on trac or a feature request here?

Thanks.

EDIT: Sorting the playlist in descending order results in the content listed in ascending order. Huh
Reply
#11
(2014-12-04, 17:50)Hitcher Wrote: I've also found that it messes with playlists as well.
I made one to list movies in ascending order of rating but when loaded as content it's listed in descending order.

Should this be reported as a bug on trac or a feature request here?

Thanks.

EDIT: Sorting the playlist in descending order results in the content listed in ascending order. Huh

Are you talking about smartplaylists? Is it possible that you have set the order in the smartplaylist to descending? In that case it might happen that the applied sorting will invert the result. This is handled properly in the media window logic (where it tries to map the settings from the smartplaylist with the ones from the view) but it might need a more global solution.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#12
Yes, smart playlists.

Which ever way I set the order in the playlist it's the opposite when used as content in a list.
Reply
#13
(2014-12-05, 19:52)Hitcher Wrote: Yes, smart playlists.

Which ever way I set the order in the playlist it's the opposite when used as content in a list.

I'll see if I manage to hack confluence to use the <content> tag somewhere so I can test it. Or is there a skin where I can easily manipulate what is loaded by a <content> list (so that I can try different smartplaylists)?
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#14
Conq will let you add a playlist widget to any home menu item - Skin Settings > Customise Home Menu > Select Widget and playlists will be at the bottom.

Here's the one I was using -

PHP Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>Top Rated Movies</name>
    <match>one</match>
    <rule field="rating" operator="is">
        <value>10</value>
    </rule>
    <rule field="rating" operator="lessthan">
        <value>10</value>
    </rule>
    <limit>25</limit>
    <order direction="descending">rating</order>
</smartplaylist> 
Reply
#15
Okay I think I found the problem for the reverse sorting. Could you verify for me that this only happens when sorting by playcount or rating (for videos)?

EDIT: Wow this sorting stuff is one big mess. Because we only keep one sort order for a view there's some logic that reverts the sort order for some sort methods (like playcount and rating) but this does not take into account that for smartplaylists we have already set the sort method and order exactly the way we want them.
This also leads to very odd behaviour in general i.e. when you e.g. sort by date added and change sorting direction to descending and then you move to sort by title the sort order will also be descending. But if you move to sort by rating the sort order will be ascending. Not sure if it's intuitive that the sort order stays the same between different sort methods or if it should be reset to the next sort methods default when switching sort methods (but remember those default when cycling through the sort methods and coming back to one the user already used before).

EDIT2: Just realized that your smartplaylist is working perfectly fine for me when using it as a home menu widget. The sorting is only screwed up (as described above) when I'm looking at the smartplaylist in the video library.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply

Logout Mark Read Team Forum Stats Members Help
Sort order problem with filling a list from library0