HTTP API questions?
#1
I'm creating a remote controller for XBMC which uses the http api (link in sig). Now I have some questions I hope you can answer.

1. Is it possible to obtain all available data (all 'getters') in one request? This could severely reduce network connection and XBMC server load. I'm doing several requests per second now, all to obtain data about what is playing now. If all this information would be on one page this would run smoother and with less problems.

2. I would like to implement love/hate support. Is this possible? If yes, how?

3. The 'Percentage' request (progress currently playing media) sometimes returns more then 100. Is it intended to or is this a bug?

4. I would like to offer the currently playing media for 'download'. I know a base64 string can be generated but this causes problems with larger files. Also, I would have to convert the string back to mp3 i.a. which I thinks is not possible without having to buy components (.Net). Can the HTTP api simply offer a file for download like it does with cover art thumbnails?

5. Does XBMC save the thumbnail (q:\web\thumb.jpg) in it's full resolution or does it resize it automatically?


Thanks in advance!
Image

Please add to my reputation if you find my posts usefull (+/- button below posts)
Ubuntu 12.10 minimal XBMC auto-install script :: XBMControl :: Xbmc XBOX Skins :: XBMControl for Android :: Owner of Sudo Systems
Reply
#2
Another thing I'd like to know is how start party mode and use repeat and shuffle with the HTTP Api.
Image

Please add to my reputation if you find my posts usefull (+/- button below posts)
Ubuntu 12.10 minimal XBMC auto-install script :: XBMControl :: Xbmc XBOX Skins :: XBMControl for Android :: Owner of Sudo Systems
Reply
#3
last.fm love & hate, partymode & shuffle & repeat are all built in : http://wiki.xbmc.org/?title=List_of_Built_In_Functions

XBMC.PlayerControl
XBMC.LastFM.Love/.Ban
Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
Reply
#4
Ok, but what does that mean? Can I use these options from the HTTP Api?
Image

Please add to my reputation if you find my posts usefull (+/- button below posts)
Ubuntu 12.10 minimal XBMC auto-install script :: XBMControl :: Xbmc XBOX Skins :: XBMControl for Android :: Owner of Sudo Systems
Reply
#5
Yes you can use all built-in functions via the Web Server API (HTTPAPI), see:
http://wiki.xbmc.org/?title=WebServerHTTP-API
http://wiki.xbmc.org/?title=Action_IDs
http://wiki.xbmc.org/?title=List_of_Built_In_Functions

Happy coding :grin
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.
Reply
#6
I understand I can use these functions when running a script from the built in webserver. But can I use them by passing cammands with parameters to http://xbox/xbmcCmds/xbmcHttp?command=¨c...parameter¨ ? Sorry if that´s what you´re telling me and I mis understand.
Image

Please add to my reputation if you find my posts usefull (+/- button below posts)
Ubuntu 12.10 minimal XBMC auto-install script :: XBMControl :: Xbmc XBOX Skins :: XBMControl for Android :: Owner of Sudo Systems
Reply
#7
look at ExecBuiltIn(function) under miscellaneous
http://wiki.xbmc.org/?title=WebServerHTTP-API
Reply
#8
Yes - you use execbuiltin
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.


Image
Reply
#9
It's in the httpapi docs under misc commands:
http://xbox/xbmcCmds/xbmcHttp?command=Ex...c_Built_In>

[HTML]http://xbox/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter= PlayerControl(Partymode)
[/HTML]

Edit: filled in a response, got distracted, didn't see jmarshall & matt_cyr's replies
Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
Reply
#10
Great! That's what I'm looking for!

So I can do this...?

Code:
http://xbox/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=LastFM.Love(false)
Image

Please add to my reputation if you find my posts usefull (+/- button below posts)
Ubuntu 12.10 minimal XBMC auto-install script :: XBMControl :: Xbmc XBOX Skins :: XBMControl for Android :: Owner of Sudo Systems
Reply
#11
Great. Most things work great. But I still have some questions.

1.
Code:
http://xboc/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=Partymode(music)
Does not start party mode. It returns "Ok" but nothing happens. Am I missing something?


2.
Code:
http://xbox/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=TakeScreenshot(screenshot.jpg;false;0;720;576;75;true;)
...returns "Ok" while it should return the base64 image string (I think).

Since I'm running Beta2...
Code:
http://xbox/xbmcCmds/xbmcHttp?command=takescreenshot&parameter=screenshot.png;false;0;720;576;75;true;
...returns "Error:Could not convert image, error: " while this method worked before (returned the base64 image string)

3.
How can I know if a user is connected to Last.FM (has a working Last.FM account configured in XBMC) using the HTTP Api.

4.
How can I get information about if party mode, shuffle and repeat are enabled from the HTTP Api?
Image

Please add to my reputation if you find my posts usefull (+/- button below posts)
Ubuntu 12.10 minimal XBMC auto-install script :: XBMControl :: Xbmc XBOX Skins :: XBMControl for Android :: Owner of Sudo Systems
Reply
#12
1. http://xbox/xbmcCmds/xbmcHttp?command=Ex...&parameter=PlayerControl(Partymode('music'))



3. http://192.168.2.4/xbmcCmds/xbmcHttp?com....username)

Haven't messed with the other stuff.
Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
Reply
#13
Great! Thanks. You are all very help full and XBMC has an incredible amount of options for developers.
This way of checking for Last.FM use doesn't make sure the link to Last.FM does actually work, but it will do Smile
Starting party mode works perfectly. I love this option. Now all I need to know is how to make XBMC tell me if party mode, shuffle (random) or repeat is enabled.
Image

Please add to my reputation if you find my posts usefull (+/- button below posts)
Ubuntu 12.10 minimal XBMC auto-install script :: XBMControl :: Xbmc XBOX Skins :: XBMControl for Android :: Owner of Sudo Systems
Reply
#14
I've downloaded the XBMC source to find out what options there are to use GetGuiSettings.

The option for obtaining the information about the current repeat state is commented out. The following always returns false

Code:
http://xbox/xbmcCmds/xbmcHttp?command=GetGuiSetting(1;musicfiles.repeat)

But then again, all incorrect second parameters do. I'd expect there would be a "musicfiles.random" and "musiclibrary.partymode" to, but there isn't unless I'm missing something?
Image

Please add to my reputation if you find my posts usefull (+/- button below posts)
Ubuntu 12.10 minimal XBMC auto-install script :: XBMControl :: Xbmc XBOX Skins :: XBMControl for Android :: Owner of Sudo Systems
Reply
#15
And why is the bitrate variable not longer in "GetCurrentlyPlaying"? Is there somewhere else I can get it from now?
Image

Please add to my reputation if you find my posts usefull (+/- button below posts)
Ubuntu 12.10 minimal XBMC auto-install script :: XBMControl :: Xbmc XBOX Skins :: XBMControl for Android :: Owner of Sudo Systems
Reply

Logout Mark Read Team Forum Stats Members Help
HTTP API questions?0