2012-06-14, 13:12
I have trouble using wildcards with the executehttpapi function.
I have this
in query and send it to
the quote_plus makes it look like this
But get no match even though the file is in the db.
This is just my guess... somewhere after that the double % get handle as %s (due to the filename starting with s) and that wont return a match.
If I remove the %% it works, but I need em in some cases.
If I change the first s to upper case it works, but not really a fix.
What am I doing wrong
I have this
Code:
UPDATE files SET playCount = 1 WHERE strFilename LIKE "%%s04e03 EPT 4 - Barcelona Final Table.avi"
Code:
xbmc.executehttpapi( "ExecVideoDatabase(%s)" % urllib.quote_plus(query.encode( "utf-8", "ignore" )), )
Code:
UPDATE+files+SET+playCount+%3D+1+WHERE+strFilename+LIKE+%22%25%25s04e03+EPT+4+-+Barcelona+Final+Table.avi%22
This is just my guess... somewhere after that the double % get handle as %s (due to the filename starting with s) and that wont return a match.
If I remove the %% it works, but I need em in some cases.
If I change the first s to upper case it works, but not really a fix.
What am I doing wrong