Smart Playlist Oder by Title
#1
Order by Title sorts by title, not sorttitle. While not a problem if you are viewing the playlist directly (using sort by name), it presents a problem if you use the playlist in a script (PseudoTV).

I searched but could not find the discrepancy discussed.
Reply
#2
If you nut out the relevant SQL for sorting by the suitable combination of field A and field B (should be something like choose field A if it's non-empty, else use field B) then we can hook it up.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
jmarshall Wrote:If you nut out the relevant SQL for sorting by the suitable combination of field A and field B (should be something like choose field A if it's non-empty, else use field B) then we can hook it up.

In MySQL:

select if(c10='',c00,c10) sorttitle from movie order by if(c10='',c00,c10);

In SQLite3

select case when c10='' then c00 else c10 end sorttitle from movie order by case when c10='' then c00 else c10 end;


If you need me to add in the conditional replacement of articles (a, an, the), I can.
Reply
#4
Thanks Smile I think the case statement should work on mysql as well?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
The docs seem to imply that it would but the case statement has two different forms in mysql. Neither seems to exactly match the form used in sqlite.
Reply
#6
In that case I'll implement it for sqlite and ping firnsy to ensure that mysql is taken care of - will push to a branch in github in case you want to make some changes/test it out etc.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#7
jmarshall Wrote:In that case I'll implement it for sqlite and ping firnsy to ensure that mysql is taken care of - will push to a branch in github in case you want to make some changes/test it out etc.

Thanks jmarshall. I try not to complain without offering a solution.
Reply

Logout Mark Read Team Forum Stats Members Help
Smart Playlist Oder by Title0