PLEASE HELP - listitem.path missing trailer \ - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: PLEASE HELP - listitem.path missing trailer \ (/showthread.php?tid=69765) |
PLEASE HELP - listitem.path missing trailer \ - matthuisman - 2010-02-07 Hi, Im using: RunScript(special://home/scripts/YouTrailer/default.py,"$INFO[listitem.filename]","$INFO[listitem.path]") to send the path of currently selected movie to my script. I then query the xbmc db "path" table for this path. works fine on PC when the movies path is SMB://gfdgg/ghgfh/ but, if i try with local movies "C:\blah blah\" the path gets sent without the trailing "\" so query on db won't wind path This will be due to "$INFO[listitem.path]". It will translate to "C:\blah blah\" so, it will be taking the end " as literal Any way to run a replace command in a xbmc skin file eg: "$INFO[listitem.path].replace('\\','\\\\')" ?? Any help would be greatly apreciated! - matthuisman - 2010-02-07 Hmm. Doing: "$INFO[listitem.path] " (note the space after the ] ) Then just .strip() the path in the script. Can anyone see anything wrong with doing this? - blittan - 2010-02-07 sounds wierd, but why are you doing "$INFO..." try with just $INFO no " (quotes) also in the script try and do sys.argv[2].replace('\\','\\\\') - matthuisman - 2010-02-07 Hi, Without quotes, it passes filenames "10,000 BC" as "000 BC" etc. Ill try the sys.argv replace Ok. Tried the replace. Doesn't work Gave me: C:\\foo\\foo" Note: the end quotes, again taken as literal |