![]() |
|
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) Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
- MKay - 2010-10-16 12:26 Tolriq Wrote:After some tests i can confirm that System.GetInfoLabels is good for getting currently informations even with empty playlistTHX for the tip ![]() But it's too bad that the cover-string is always empty ("MusicPlayer.Cover", "VideoPlayer.Cover") and that there is no information available about the season- or episode-number or if the player is paused
- Tolriq - 2010-10-16 13:17 Well since the infolabels returns "" on no data, you can do a first request to get all audio and video data, this will let you know wich player is active ![]() Then a xxxplayer.state gives the states. This is bad because asking for more data than needed in the first request but it permits to go from 4 request to 2 to have all the needed informations. This seems to be a good compromise. For the thumb / fanart it's really easy to get them from the file name. And since in you case i don't think user can clear the playlist before you have made the first data get you can use the xxxplaylist.getitems to get fanart / thumb and player state instead of player.state (Well if suppose that if the media goes to the second one after the clear it won't work but can't test since don't use that).Edit : Wiki is not complete since you can find in confluence skin that VideoPlayer.Season and VideoPlayer.episode exists ![]() For the paused there is Player.Paused but needs to be called with the System.GetInfoBooleans too bad the bool can"t be get with the other functions, still needs to make 2 requests But well it's better than 4
- MKay - 2010-10-16 13:47 Hehe, a few minutes ago i wrote sth. similar to yours ![]() I use GetInfoLabels to decide which player is active, get Volume, get Shuffle-Status etc and use the playlist's GetItems-Method to get the thumbs, player-status and episode-info (if playlist is not empty). Although it would be better if these info were also available via info-Methods ![]() EDIT: Perfect, "VideoPlayer.Season" and "VideoPlayer.Episode" works well. But as you mentioned already: 2 requests is minimum
- Tolriq - 2010-10-16 16:48 Well another regression, in beta 3 even the httapi GetCurrentlyPlaying() does no more return correct information for movies not started from the media library view. Seems no more choice than using getinfolabels this will break some remote software i think. Edit : Well i speak too quick Even GetInfoLabels does no more works on Beta 3 (perhaps it's normal since GetCurrentlyPlaying use this i think).This is a very annoying problem, since using httpapi you usually play media by file name and if you do so you wont get the data back. Edit 2 : Strange, but if using the json "XBMC.Play" with param file="" it works, so i think that the bug can be corrected i think. Because even the skins don't have information if starting movie in file mode (that some users still uses) - Tolriq - 2010-10-16 18:48 Is there a way to add an array of items to playlist ? Because audioplaylist.add by songid one by one is just really slow when dealing with large lists. And two small remark, AudioPlaylist.GetItems always returns fanart url even if the file (the fanart) does not exists And AudioPlaylist.GetItems returns thumbs if songs started by songid but not if started with file (but always fanart). (same bug as previous post i suppose). - Montellese - 2010-10-17 16:19 I just noticed that when I call Player.GetTimeMS right after I received a PlaybackPaused announcement it contains Code: "paused": true,Do I need to wait a certain time before I call GetTimeMS or is the "playing" value never adjusted? EDIT: Something similar happens when calling GetTimeMS right after receiving a PlaybackSeek announcement. The value of the current position still returns the position of playback BEFORE seeking. Furthermore when stopping a paused playback (for reproduction: start playing a song, pause it and then stop it completely) the PlaybackStopped announcement is sent twice. - topfs2 - 2010-10-18 04:50 Hmm, well info stuff is abit hacked together. At any rate, I'd say that those that return busy should probably not return until data is actually available. - Tolriq - 2010-10-18 08:36 Yes because the Busy is translated to the user locale so hard to base on the text to know if needs to retry ![]() Any idea for the regression in Beta 3 about no more getting plot or such things from Json or HTTPAPI if files are started from httpapi or json (sometimes only) filename or the xbmc file mode ? (No data in getitems, getinfolabels and httpapi getcurrentlyplaying) - slash - 2010-10-18 13:23 Hi, I've been porting my tool (XWMM) to JsonRPC for a while now and it works like a charm. You guys did a great job. As a fan I have few additional requests ![]() - Files.GetSources does not give the USB drives - How can I use Files.Download to copy files to the XBMC machine ? - Can ScanForContent take a directory as parameter, to specefy where to start the scan ? - Would it be possible to add an equivalent to "refresh item" and have JsonRPC reply with the list of possible titles to choose from (don't know how difficult it would be)? Also, I know that JsonRPC will not support library manipulation, what would be the suggestion to do that. Should I write my own code or python scripts and execute them with the HTTP execBuiltIn function? Thanks - topfs2 - 2010-10-18 15:21 slash Wrote:Hi, GetSources probably should give tem, via parameter to aggregate autoadded sources (such as optical and dvd) probably. Files.Download will just give you direction on how to download based on your current transport. Http will just give you a URL you can access, TCP at some point might give you a port and so on. ScanForContent won't take a parameter of path since its hard / impossible to make proper (other thread regarding this matter). Refresh might be interesting, not sure how to code it up but definatly a nice thing if possible. Seems perfect to be able to refresh scanned items via the web interface. As for library manipulations, I'd say its appropriate to do them via httpapi for the time being. It is planned to be doable via jsonrpc at some point. Probably needs the security addition (mostly to display them in gui, a dialog that asks if client foo can have these permissions etc.). Please add tickets and cc me so we don't forget them. |