Page 30 of 94
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Thu May 24, 2012 12:48 am
by jonib
DeeWay wrote:But I want to be my playlist list opens
Hopefully this is what you mean:
HTTPAPI\ExecBuiltIn and
ActivateWindow(10025,"special://profile/playlists/video/Penguins.xsp") for the command (change the playlist name).
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Fri Jun 01, 2012 6:34 pm
by supertusse
Hello!
Does XBMC2 work with the new v12 alphas (aka nightlies?).
I've been running eventghost 0.3.7 and xbmc eden with xbmcrepeat for a long time, but decided I want to change to the 12 alphas because of some database improvements. Thing is, after upgrading xbmc, xbmcrepeat/xbmc2 doesn't work anymore. I also upgraded eventghost to the newest version available for download, to see if that would help.
No matter which eventghost version, eventghost + xbmc eden works fine. with xbmc 12 alpha I get messages like this:
Executing a video library scan action:
Code: Select all
19:32:30 XBMC2: JSONRPC: VideoLibrary.Scan
19:32:30 Error in Action: "XBMC2: JSONRPC: VideoLibrary.Scan"
19:32:30 Traceback (most recent call last) (1568):
19:32:30 File "H:\Program Files\EventGhost\eg\Classes\ActionBase.py", line 170, in CallWrapper
19:32:30 return self(*args)
19:32:30 File "H:\Program Files\EventGhost\plugins\XBMCRepeat\__init__.py", line 890, in __call__
19:32:30 responce = self.plugin.JSON_RPC.send(method)
19:32:30 File "H:\Program Files\EventGhost\plugins\XBMCRepeat\__init__.py", line 681, in send
19:32:30 return json.loads(responce)
19:32:30 File "json\__init__.pyc", line 307, in loads
19:32:30 File "json\decoder.pyc", line 319, in decode
19:32:30 File "json\decoder.pyc", line 338, in raw_decode
19:32:30 ValueError: No JSON object could be decoded
Clicking "update" inside the xbmc2 plugin:
Code: Select all
19:33:49 Traceback (most recent call last) (1568):
19:33:49 File "H:\Program Files\EventGhost\plugins\XBMCRepeat\__init__.py", line 914, in OnUpdate
19:33:49 UpdateMethods()
19:33:49 File "H:\Program Files\EventGhost\plugins\XBMCRepeat\__init__.py", line 929, in UpdateMethods
19:33:49 responce = self.plugin.JSON_RPC.send('JSONRPC.Version')
19:33:49 File "H:\Program Files\EventGhost\plugins\XBMCRepeat\__init__.py", line 681, in send
19:33:49 return json.loads(responce)
19:33:49 File "json\__init__.pyc", line 307, in loads
19:33:49 File "json\decoder.pyc", line 319, in decode
19:33:49 File "json\decoder.pyc", line 338, in raw_decode
19:33:49 ValueError: No JSON object could be decoded
After reinstalling xbmc eden, everything is back to normal.
Regards,
tusse.
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Fri Jun 01, 2012 7:53 pm
by jonib
supertusse wrote:Does XBMC2 work with the new v12 alphas (aka nightlies?).
It did work

. I just tried the last nightly and I'm getting errors too. So something in the response from XBMC must have changed (And there might be bugs in XBMC2

)
The normal control actions seems to work.
I'll look into it. I'm in the process of moving (from my analogue home) so I don't know when.
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Fri Jun 01, 2012 10:37 pm
by supertusse
Hi again.
I did a small modification in the
send method inside
class XBMC_JSON_RPC. The 'try' block now reads:
Code: Select all
try:
#responce = urllib.urlopen('http://'+self.ip+':'+self.port+'/jsonrpc', json.dumps(self.jsoninit)).read()
request = urllib2.Request('http://'+self.ip+':'+self.port+'/jsonrpc',json.dumps(self.jsoninit))
request.add_header('Content-Type', 'application/json')
responce = urllib2.urlopen(request).read()
I also had to add
import urllib2 at the start of the program.
.. and it works again.

Seems like the trick is to add the content-type header for xbmc v12.
I have no idea if you really need to used urllib2 for this, or if you can do it differently with urllib, but it works.
tusse.
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Fri Jun 01, 2012 10:51 pm
by jonib
supertusse wrote:I did a small modification in the send method inside class XBMC_JSON_RPC. The 'try' block now reads:
Nice. Makes my job easier.

Thanks for posting.
.. and it works again.

Seems like the trick is to add the content-type header for xbmc v12.
Aha, yes I read about XBMC 12 being stricter with the header, but hadn't looked into it yet.
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Wed Jun 13, 2012 2:54 pm
by nonob
DeeWay wrote:I've created several playlists in XBMC, now I want to put any playlist on a button on the remote control with Event Ghost .. how can this be done?
I think the easiest is to use the HTTPAPI command PlayFile.
Make a macro and add the HTTPAPI action from XBMC2\Experimental. Configure it like the picture below (with a path to your playlist file).
XBMCPlayFile.PNG
jonib
Hi,
First thanks for this great plugin
I have also some music playlists and would like to play them with a assigned remote button.
I tried your instruction but it doesn't work, i have just this line inlog :
Code: Select all
'<div style="position:absolute;right:1em;bottom:1em;font-size:10px;color:red"></div>'
My playlists are all
smart playlist (file in userdata is .xsp and i think it is just the smart playlist configuration, not exactly a standart playlist file (m3u) to play with links to files...).
Is there a way to load and play my smart playlists ?
Thanks
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Thu Jun 14, 2012 10:31 am
by jonib
nonob wrote:First thanks for this great plugin

Thanks.
Is there a way to load and play my smart playlists ?
Looks like you need to use this for music playlists:
ActivateWindow(10502,"special://profile/playlists/music/All.xsp"). Change All.xsp to your specific playlist filename.
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Thu Jun 14, 2012 11:27 am
by nonob
Hi,
It doesn't work, what am i doing wrong ?
(I don't want to open my xbmc playlist "list", i just want to play it).
Thanks
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Thu Jun 14, 2012 3:59 pm
by jonib
nonob wrote:It doesn't work, what am i doing wrong ?
What version of XBMC are you using?
I didn't have time to test before so the command might be wrong, I'll check when I have eaten.
Edit: Oops

, Try the command from this
post.
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Thu Jun 14, 2012 6:48 pm
by nonob
I already tried this, it's the first command i tried, but it didn't work... :
I have XBMC eden ...
Thanks
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Thu Jun 14, 2012 7:00 pm
by jonib
nonob wrote:I already tried this, it's the first command i tried, but it didn't work... :
Hmm, Would you mind trying a different network port in XBMC (and in the plugin). As I'm suspecting the "div styles" log result is not from XBMC, maybe there is a port conflict.
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Fri Jun 15, 2012 6:23 am
by nonob
Yeah! It works
I didn't think about my share server software (weezo) which work on port 80.
But there was another little thing: http support wasn't checked in xbmc settings.., but it wasn't the main cause.
So i checked it, i change port to 81, i also change port in xbmc plugin by double clicking on xbmc2 in autostart arborescence (i searched a little time for that

), and it works with the "playfile" command.
Thanks a lot.
Hum, i take this opportunity to ask you another thing: i'm suprised to see the "0" remote button start all my music files when i'm on music screen, on the "genre", "artist", "album" or "song" menu.
Anyway, it could be a good thing but with my about 5000 songs loaded in playlit, XBMC become extremly slow..
Do you think my 5000 songs is too much for XBMC ??
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Sun Jun 24, 2012 4:02 am
by Livin
jonib,
any updates to test?
Do you know if they added any more JSON functionality? I opened this thread and it seems they might be receptive...
http://forum.xbmc.org/showthread.php?tid=126413
TRAC ticket...
http://trac.xbmc.org/ticket/12830
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Sun Jun 24, 2012 8:50 pm
by jonib
nonob wrote:Yeah! It works
I didn't think about my share server software (weezo) which work on port 80.
But there was another little thing: http support wasn't checked in xbmc settings.., but it wasn't the main cause.
So i checked it, i change port to 81, i also change port in xbmc plugin by double clicking on xbmc2 in autostart arborescence (i searched a little time for that

), and it works with the "playfile" command.
Thanks a lot.
Great.
Hum, i take this opportunity to ask you another thing: i'm suprised to see the "0" remote button start all my music files when i'm on music screen, on the "genre", "artist", "album" or "song" menu.
Anyway, it could be a good thing but with my about 5000 songs loaded in playlit, XBMC become extremly slow..
Do you think my 5000 songs is too much for XBMC ??
Sorry for the late response, I have very limited experience with XBMC's music functionality, so don't know. sorry.
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Sun Jun 24, 2012 8:58 pm
by jonib
Livin wrote:any updates to test?
Not at the moment. I was hoping for more feedback from the last test version. But I'll have to assume it works perfectly

and I'll make a proper release soonish (hopefully). When I'm done with my apartment moving.
Do you know if they added any more JSON functionality?
There has been activity, but I haven't been following it too closely at the moment.
jonib