2012-02-16, 15:01
Did you have the same issue with playlists stored in special://profile/playlists/video/ ?
Can you send me your email by MP, I cannot post attachments
Can you send me your email by MP, I cannot post attachments
if PLAYLIST == "":
PLAYLIST = "videodb://1/2/"
json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "%s", "media": "video", "properties": ["year", "runtime", "file", "playcount", "rating", "plot", "fanart", "thumbnail", "resume", "trailer"]}, "id": 1}' %(PLAYLIST))
json_query = unicode(json_query, 'utf-8', errors='ignore')
json_pl_response = simplejson.loads(json_query)
[b]print("JSON_PL_RESPONSE=",json_pl_response)[/b]
mikebzh44 Wrote:Or can you simply edit randomandlastitems.py and add the line in bold :
Code:if PLAYLIST == "":
PLAYLIST = "videodb://1/2/"
json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "%s", "media": "video", "properties": ["year", "runtime", "file", "playcount", "rating", "plot", "fanart", "thumbnail", "resume", "trailer"]}, "id": 1}' %(PLAYLIST))
json_query = unicode(json_query, 'utf-8', errors='ignore')
json_pl_response = simplejson.loads(json_query)
[b]print("JSON_PL_RESPONSE=",json_pl_response)[/b]
and give me the log file.
Thanks.
15:23:08 T:5016 WARNING: CUtil::GetMatchingSource... no matching source found for ['special://masterprofile/playlists/video/Dokumentationen.xsp']
15:23:08 T:5016 WARNING: Previous line repeats 4 times.
15:23:08 T:5016 WARNING: XFILE::CFactoryDirectory::Create - Unsupported protocol('special) in 'special://masterprofile/playlists/video/Dokumentationen.xsp'
15:23:08 T:5016 NOTICE: ('JSON_PL_RESPONSE=', {u'jsonrpc': u'2.0', u'id': 1, u'error': {u'message': u'Invalid params.', u'code': -32602}})
15:23:08 T:5016 ERROR: Error Type: <type 'exceptions.KeyError'>
15:23:08 T:5016 ERROR: Error Contents: ('result',)
15:23:08 T:5016 ERROR: Traceback (most recent call last):
File "C:\Users\max\AppData\Roaming\XBMC\addons\script.randomandlastitems\randomandlastitems.py", line 181, in <module>
_getMovies()
File "C:\Users\max\AppData\Roaming\XBMC\addons\script.randomandlastitems\randomandlastitems.py", line 50, in _getMovies
if (json_pl_response['result'] != None) and (json_pl_response['result'].has_key("files")):
KeyError: ('result',)
15:23:08 T:4576 ERROR: CRemoteControl::Connect - failed to connect
15:23:19 T:2324 ERROR: Control 1 in window 10099 has been asked to focus, but it can't
<onload>XBMC.RunScript(script.randomandlastitems,limit=3,method=Last,playlist=special://skin/playlists/HDMovies.xsp,menu=Menu1)</onload>
mikebzh44 Wrote:Could you test with this calling (without ' before and after each parameter value):
Code:<onload>XBMC.RunScript(script.randomandlastitems,limit=3,method=Last,playlist=special://skin/playlists/HDMovies.xsp,menu=Menu1)</onload>
On my PC, I've got the same error as you if I put '
Maybe I have to handle this case and remove it when parsing parameters.
mad-max Wrote:That did the trick...Now it works like a charm...For the ', I will try to manage it in the script.
Thanks!
BTW and a bit OT: I recoded the GUI.ViewInstaller Window from 1080i to 720p...if you are interested, I can send you the xml...
mm