Bug Smart Playlist not working correctly - empty
#1
I've found some major flaws in Smart Playlists I'm not able to overcome.
I already run in the issue in the past but was not able to identfy it.

Here is the situation
XBMC 13.1 Gotham - local db configuration - 1 smart playlist Toons

Toons.xsp
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>Toons</name>
    <match>all</match>
    <rule field="path" operator="startswith">
        <value>V:\Toons\</value>
    </rule>
    <order direction="ascending">sorttitle</order>
</smartplaylist>

Simple and plain: show only files in the Toons directory.

I decided to move the library on MySQL. Following the instructions I exported the library, updated the advancedsettings.xml, created the db, imported the data.
Everything fine, movies there

BUT

the playlist does not work. Is EMPTY

I created a second one and the only way to see any of my content is

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>Toons 2</name>
    <match>all</match>
    <rule field="path" operator="contains">
        <value>Toons</value>
    </rule>
</smartplaylist>

This is NOT ACCEPTABLE as I have several libraries that are separated by words that can be even part of the title (Kids, Movies, etc...)

Also is a bug, why the libraries that were working before now are not working?
what am I doing wrong?

I've checked on the DB and the paths are perfect, correct case too...
If you think I'm useful please use the +/- button to raise my reputation
Reply
#2
NOTE: only the three default lists works: recently watched, radnom, recently added
If you think I'm useful please use the +/- button to raise my reputation
Reply
#3
Debug Log
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
#4
damn! I've cleared the library to try to troubleshoot......

if issue still there will post the log...


jmarshall: sorry me dummy!
If you think I'm useful please use the +/- button to raise my reputation
Reply
#5
Ok: issue still there: LOG
http://pastebin.com/embed_iframe.php?i=DdMiqYtu

Note I've fully cleaned ALL Libraries, compacted the DB
scanned new content (local NFO)

only for the Toons directory

NO content under the Toons.XSP
If you think I'm useful please use the +/- button to raise my reputation
Reply
#6
here is the error
13:30:23 T:2172 DEBUG: CVideoDatabase::RunQuery took 5 ms for 0 items query: select * from movieview WHERE ((movieview.strPath LIKE 'V:\\Cartoni\\%'))


while:
select distinct strPath from movieview

executed on mySQL phpAdmin

Code:
V:\Cartoni\toon 1\
V:\Cartoni\toon 2\
V:\Cartoni\toon 3\

THIS is the correct query:
select * from movieview WHERE ((movieview.strPath LIKE 'V:\\\\Cartoni\\\\%'))

as per MySQL documentation
http://dev.mysql.com/doc/refman/5.5/en/s...tions.html

Code:
Note

Because MySQL uses C escape syntax in strings (for example, “\n” to represent a newline character), you must double any “\” that you use in LIKE strings. For example, to search for “\n”, specify it as “\\n”. To search for “\”, specify it as “\\\\”; this is because the backslashes are stripped once by the parser and again when the pattern match is made, leaving a single backslash to be matched against.

How to fix it?
If you think I'm useful please use the +/- button to raise my reputation
Reply
#7
STUPID Workaround: duplicate the \ in the XSP file

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>Toons</name>
    <match>all</match>
    <rule field="path" operator="startswith">
        <value>V:\\Toons\\</value>
    </rule>
    <order direction="ascending">sorttitle</order>
</smartplaylist>
If you think I'm useful please use the +/- button to raise my reputation
Reply
#8
IIRC there is a mysql-ism that means you need to duplicate, yup. You'll find your original smartplaylist works just fine under sqlite, and that the slashes are already escaped.

It's the duplicate unescaping that mysql uses that breaks it - happens with all win32 paths.
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
#9
I hope there is a variable to know if is MySQL or sqllite
it should be simple to manage those strings correctly
If you think I'm useful please use the +/- button to raise my reputation
Reply

Logout Mark Read Team Forum Stats Members Help
Smart Playlist not working correctly - empty0