XBMC Community Forum
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Development (/forumdisplay.php?fid=93)
+---- Forum: JSON-RPC (/forumdisplay.php?fid=174)
+---- Thread: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC (/showthread.php?tid=68263)



- grywnn - 2011-11-01 09:32

Will post a bug report, but i thought i'd mention it here too:
If i start video playback through while a screensaver is active, the screensaver keeps running while the video is playing.
Most screensavers run in the background, but the "dim" screensaver causes the whole video to be dimmed.
I'm using VideoPlaylist.Play to start playback.

I'm currently sending an extra keyboard event through the event server when starting playback to stop the screensaver, but IMHO it should be XBMCs job to cancel the sv when video playback is started Smile


- Montellese - 2011-11-01 11:49

grywnn Wrote:Will post a bug report, but i thought i'd mention it here too:
If i start video playback through while a screensaver is active, the screensaver keeps running while the video is playing.
Most screensavers run in the background, but the "dim" screensaver causes the whole video to be dimmed.
I'm using VideoPlaylist.Play to start playback.

I'm currently sending an extra keyboard event through the event server when starting playback to stop the screensaver, but IMHO it should be XBMCs job to cancel the sv when video playback is started Smile

The fact that you are using VideoPlaylist.Play tells me that you are either using Dharma or an old nightly build. This bug has been reported before and it should be fixed in the recently nightly builds. When my monitor is dimmed because of the screensaver and I use the webinterface to start a movie it un-dims the screen before starting playback.


- grywnn - 2011-11-01 11:56

Montellese Wrote:The fact that you are using VideoPlaylist.Play tells me that you are either using Dharma or an old nightly build. This bug has been reported before and it should be fixed in the recently nightly builds. When my monitor is dimmed because of the screensaver and I use the webinterface to start a movie it un-dims the screen before starting playback.

Sorry, got my own code wrong.
Actually i'm using Player.Open, and got this issue both on my Linux Pre-11.0 PVR build from oct. 22nd and on my Mac with todays nightly.
Looks like only the "dim" screensaver is affected - all other screensavers i tested stopped while playback was running but started again as soon as playback stops (instead of waiting 3 minutes again).

I'll update the track accordingly and attach an log, too.


- jimk72 - 2011-11-04 01:57

Not sure if this is a bug but when I start a movie in xbmc the onplay gives player Id 1 and when I play music in xbmc it gives id of 0. Which works fine but if I am listening to music and call player.open and send movieid it returns an onplay with playerid 0 when actually it should be 1. Calling a getitem with player 0 returns error but getitem playerid 1 returns the movie info?
Clicking movie in xbmc when playing music switches playerid back to 1. My guess is calling player.open isn't switching the playerid properly.

After further testing I've also received a playerid of -1 from an onplay notification.


- Montellese - 2011-11-05 01:12

That sounds like it's related to the problem that items started through Player.Open or recentlyadded etc are not added to a playlist. I'll have to investigate. Thanks for the report.


- Martijn - 2011-11-05 03:40

Is it possible to directly retrieve the total number of seasons of one tv show?
For skins there is:
Code:
ListItem.Property(TotalSeasons)

Is there something simulair for JSON?


- Montellese - 2011-11-05 10:36

Not possible for now unless by calling VideoLibrary.GetSeasons.


- Montellese - 2011-11-05 11:21

jimk72 Wrote:Not sure if this is a bug but when I start a movie in xbmc the onplay gives player Id 1 and when I play music in xbmc it gives id of 0. Which works fine but if I am listening to music and call player.open and send movieid it returns an onplay with playerid 0 when actually it should be 1. Calling a getitem with player 0 returns error but getitem playerid 1 returns the movie info?
Clicking movie in xbmc when playing music switches playerid back to 1. My guess is calling player.open isn't switching the playerid properly.

After further testing I've also received a playerid of -1 from an onplay notification.

This commit should fix the problem for both media started through Player.Open and media started through recentlyadded: https://github.com/xbmc/xbmc/commit/5748f59f3194a3021f353fba9096c7380a2e0807

But the media is still not added to the correct playlist but notifications now contain the correct playerid.


- Martijn - 2011-11-05 13:15

Montellese Wrote:Not possible for now unless by calling VideoLibrary.GetSeasons.

Is this something that could be included in the future (if yes should i create a request ticket) or just stick to the 'VideoLibrary.GetSeasons' ?

I have some problem retrieving the tvshow ID. All it returns is : none
What am I doing wrong in this code:
Code:
findtvshowid = re.search( '"tvshowid":"(.*?)","', mediaitem )

Complete code:
http://pastebin.com/cWHXQxSa

Log:
http://pastebin.com/ZZZnLKZ9


- Montellese - 2011-11-05 13:43

Machine-Sanctum Wrote:Is this something that could be included in the future (if yes should i create a request ticket) or just stick to the 'VideoLibrary.GetSeasons' ?

I'll have to see if it will increase the query retrieval time or not. Feel free to create a feature request ticket.

Quote:I have some problem retrieving the tvshow ID. All it returns is : none
What am I doing wrong in this code:
Code:
findtvshowid = re.search( '"tvshowid":"(.*?)","', mediaitem )

Complete code:
http://pastebin.com/cWHXQxSa

Log:
http://pastebin.com/ZZZnLKZ9

I still don't understand why you guys aren't usin JSON libraries. It makes using the data from the responses sooo much easier. In your case the regex is wrong because there are no double-quotes around an integer value. Furthermore most of your regexes will fail if someone disables compact JSON output through Advanced Settings (like I have to better debug).