Hi,
I am developing a utility that will enter my computer in stand by when :
1) no other client is connected to it (this is the main pvr HTPC), and
2) when XBMC does not play video. I am developing the utility in c#.
So far I was successful implementing part 1 (when no clients are connected on the main pvr HTPC) but I am having problems detecting when XBMC plays video.
Is there a way to detect when XBMC is playing video?
Thanks
Phanos
Detect if XBMC plays video
phanos
Junior Member Posts: 34 Joined: Feb 2011 Reputation: 0 |
2013-04-14 21:53
Post: #1
|
| find quote |
Montellese
Team-XBMC Developer Joined: Jan 2009 Reputation: 20 Location: Switzerland |
2013-04-14 22:01
Post: #2
You can use JSON-RPC's Player.GetActivePlayers method.
Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]()
(This post was last modified: 2013-04-14 22:02 by Montellese.)
|
| find quote |
phanos
Junior Member Posts: 34 Joined: Feb 2011 Reputation: 0 |
2013-04-15 13:51
Post: #3
I tried to use the recommendation for JSON-RPC. Through my browser it works fine (http://127.0.0.1:8080/jsonrpc) but through c# code I get
{"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"} My code works fine when I try to use it for POST on other web servers. Does anybody have a clue about what the problem here? My code is the following Code: String uri = "http://127.0.0.1:8080/jsonrpc";
(This post was last modified: 2013-04-15 13:52 by phanos.)
|
| find quote |
Tolriq
Member+ Joined: Jun 2009 Reputation: 53 Location: France |
2013-04-16 13:24
Post: #4
We don't see the request in this but byte[] postBytes = Encoding.ASCII.GetBytes(uri); is a potential problem all should be UTF 8 in and out
Yatse 2 : Media Center Remote Control for Touch Screens Yatse, the Xbmc Remote and Widgets for Android |
| find quote |
phanos
Junior Member Posts: 34 Joined: Feb 2011 Reputation: 0 |
2013-04-17 15:46
Post: #5
I tried UTF8 in my code but the result is the same byte[] postBytes = Encoding.UTF8.GetBytes(uri). Do I have to change it somewhere in XBMC as well?
|
| find quote |


![[Image: badge.gif]](http://www.ohloh.net/projects/9132/badge.gif)
Search
Help