![]() |
|
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 |
- sphere - 2011-10-08 22:34 Hi, is there any way to get the xbmc internal GlobalIdleTime over jsonrpc? I already tried to get this value via "System.GetProperties", "Application.GetProperties" or "XBMC.GetInfoLabels" but without success. Do I miss something? In python this is doable via "xbmc.getGlobalIdleTime()". regards, sphere - khargy - 2011-10-09 06:26 Ok, this seems to be the place to ask my JSON-RPC questions... I'm trying to switch back and forth between a video play list and a slideshow. I start the video playlist using: Code: { "jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "file": "special://profile/playlists/video/all videos.m3u" } }, "id": 1 }I start the slide show using: Code: { "jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "path": "smb://HP-MEDIA-SERVER/Photos/Melissa Scans Part 1" } }, "id": 1 }Sometimes this seems to work ok, although there is a flash of the GUI. But sometimes instead of playing it'll only show the current activity or go back to the home screen or whatever. Is there something I'm doing wrong? Also it doesn't seem like the video playlist is random, which seems to be the default, what is the syntax to add the random property? - Montellese - 2011-10-09 10:32 Mizaki Wrote:Am I right in thinking there is no way to retrieve what order an episode is in (DVD, absolute, "normal")? I want to make sure I'm not missing it before I make a feature request. Correct. AFAIK XBMC only provides the possibility to specify the episode order for tv sources and then passes this information on to the scraper but from there on there is no way to tell what order episodes in a season/show are in. So this is not really a jsonrpc feature as it is not even available in XBMC itself. - Montellese - 2011-10-09 11:12 sphere Wrote:is there any way to get the xbmc internal GlobalIdleTime over jsonrpc?No there isn't (AFAIK). IIRC there already is a pull request for this but as it is a very XBMC specific feature we haven't decided yet how to make it available through JSONRPC. khargy Wrote:Ok, this seems to be the place to ask my JSON-RPC questions...What do you mean by "switch back and forth"? You can't view a slideshow while watching a video and starting a video "destroys" the slideshow. khargy Wrote:But sometimes instead of playing it'll only show the current activity or go back to the home screen or whatever.What do you mean by "current activity"? khargy Wrote:Is there something I'm doing wrong?The calls to jsonrpc look correct. I can't test the exact same procedure because I don't have any video playlist files but starting a video using Player.Open and then starting a slideshow using Player.Open doesn't work for me either anymore. The video stops but the slideshow isn't started. Can you please create a bug ticket for this and cc me. Thanks. khargy Wrote:Also it doesn't seem like the video playlist is random, which seems to be the default, what is the syntax to add the random property?Yeah Player.Open doesn't provide the possibility to specify a "random" parameter for the videos or music, only for slideshows. And by default random is disabled for videos because I normally prefer to watch my tv episodes in the right order and not in a random order But you can call "Player.Shuffle" after you started the video playlist to randomize the playlist.
- khargy - 2011-10-09 15:18 Montellese Wrote:What do you mean by "switch back and forth"? You can't view a slideshow while watching a video and starting a video "destroys" the slideshow. No not at the same time, so I have a bunch of home movies and a bunch of photos. I want to play the movies for like 10 minutes then play the photos for 10 minutes and keep going back and forth. Since they will be on random order you'll see different stuff for the most part each time. (This will on the tv at my wedding!) Montellese Wrote:What do you mean by "current activity"? So lets say I started the first play.open (playlist) when I was on the weather screen. When I do the 2nd one (slideshow), I'm back on the weather screen basically as if I stopped the player. if I run the slideshow play.open a 2nd time in a row and it'll start. Montellese Wrote:Yeah Player.Open doesn't provide the possibility to specify a "random" parameter for the videos or music, only for slideshows. And by default random is disabled for videos because I normally prefer to watch my tv episodes in the right order and not in a random order So after I called player.open for the video playlist I called: Code: {"jsonrpc": "2.0", "method": "Player.Shuffle", "params": [1], "id": 1}I get an "ok" result but when I go to the next item it's still in order. - khargy - 2011-10-09 16:37 Ok, so this is interesting... sometimes when I called my video playlist I would use "path" and sometimes I would use "file", so: Code: { "jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "path": "special://profile/playlists/video/all videos.m3u" } }, "id": 1 }Code: { "jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "file": "special://profile/playlists/video/all videos.m3u" } }, "id": 1 }if I use "file" it plays the video in order, but if I use "path" it plays them randomly... but with "path" it seems to be playing them in player ID 2 which, if I understand things correctly is the picture player. Although I'm still getting the issue where on the 2nd play it'll get stuck on the GUI - sometimes it'll say "loading" forever, but if I just send the play.open command again it'll go. - Montellese - 2011-10-09 16:43 khargy Wrote:So after I called player.open for the video playlist I called:I'll have to investigate this later. I only tried it with playlist I created within XBMC (using the "Queue" option from the context menu) and there it worked fine. khargy Wrote:Ok, so this is interesting... sometimes when I called my video playlist I would use "path" and sometimes I would use "file", so: Yeah the "path" parameter is meant for slideshows only whereas the "file" parameter can take any kind of media (but not a directory full of media files in which case you should use the "directory" parameter instead of the "file" parameter). - grywnn - 2011-10-10 16:40 Just noticed that Files.getSources no longer returns a file/directory name per source, only a label (XBMC OS X, build from 10/09). Pretty useless this way ![]() Got no time to open a ticket, but can do tomorrow if necessary. BTW Player.getItem is GREAT! - Montellese - 2011-10-10 22:11 grywnn Wrote:Just noticed that Files.getSources no longer returns a file/directory name per source, only a label (XBMC OS X, build from 10/09).Thanks for the report. I fixed it in https://github.com/xbmc/xbmc/commit/69ea94f3f485e2f5530c6b122c1ad1b07f8cffa4 so should be fixed in the nightly of tomorrow or the day after tomorrow. grywnn Wrote:BTW Player.getItem is GREAT!Glad to hear that. - grywnn - 2011-10-10 22:23 You're my hero
|