3 * Copyright (C) 2005-2010 Team XBMC
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with XBMC; see the file COPYING. If not, write to
18 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19 * http://www.gnu.org/copyleft/gpl.html
25 const char* const JSONRPC_SERVICE_ID = "http://www.xbmc.org/jsonrpc/ServiceDescription.json";
26 const int JSONRPC_SERVICE_VERSION = 3;
27 const char* const JSONRPC_SERVICE_DESCRIPTION = "JSON RPC API of XBMC";
29 const char* const JSONRPC_SERVICE_TYPES[] = {
30 "\"Optional.Boolean\": {"
31 "\"type\": [ \"null\", \"boolean\" ],"
35 "\"type\": \"array\","
36 "\"items\": { \"type\": \"string\", \"minLength\": 1 }"
38 "\"Array.Integer\": {"
39 "\"type\": \"array\","
40 "\"items\": { \"type\": \"integer\" }"
43 "\"type\": \"object\","
45 "\"hours\": { \"type\": \"integer\", \"required\": true, \"minimum\": 0, \"maximum\": 23 },"
46 "\"minutes\": { \"type\": \"integer\", \"required\": true, \"minimum\": 0, \"maximum\": 59 },"
47 "\"seconds\": { \"type\": \"integer\", \"required\": true, \"minimum\": 0, \"maximum\": 59 },"
48 "\"milliseconds\": { \"type\": \"integer\", \"required\": true, \"minimum\": 0, \"maximum\": 999 }"
50 "\"additionalProperties\": false"
52 "\"Configuration.Notifications\": {"
53 "\"type\": \"object\","
55 "\"Player\": { \"type\": \"boolean\", \"required\": true },"
56 "\"GUI\": { \"type\": \"boolean\", \"required\": true },"
57 "\"System\": { \"type\": \"boolean\", \"required\": true },"
58 "\"VideoLibrary\": { \"type\": \"boolean\", \"required\": true },"
59 "\"AudioLibrary\": { \"type\": \"boolean\", \"required\": true },"
60 "\"Other\": { \"type\": \"boolean\", \"required\": true }"
62 "\"additionalProperties\": false"
64 "\"Configuration\": {"
65 "\"type\": \"object\", \"required\": true,"
67 "\"notifications\": { \"$ref\": \"Configuration.Notifications\", \"required\": true }"
71 "\"type\": \"integer\","
76 "\"type\": \"integer\","
81 "\"Playlist.Type\": {"
82 "\"type\": \"string\","
83 "\"enum\": [ \"unknown\", \"video\", \"audio\", \"picture\", \"mixed\" ]"
85 "\"Playlist.Property.Name\": {"
86 "\"type\": \"string\","
87 "\"enum\": [ \"type\", \"size\" ]"
89 "\"Playlist.Property.Value\": {"
90 "\"type\": \"object\","
92 "\"type\": { \"$ref\": \"Playlist.Type\" },"
93 "\"size\": { \"type\": \"integer\", \"minimum\": 0 }"
96 "\"Playlist.Position\": {"
97 "\"type\": \"integer\","
101 "\"Playlist.Item\": {"
103 "{ \"type\": \"object\", \"properties\": { \"file\": { \"type\": \"string\", \"description\": \"Path to a file (not a directory) to be added to the playlist\", \"required\": true } }, \"additionalProperties\": false },"
104 "{ \"type\": \"object\", \"properties\": { \"directory\": { \"type\": \"string\", \"required\": true } }, \"additionalProperties\": false },"
105 "{ \"type\": \"object\", \"properties\": { \"movieid\": { \"$ref\": \"Library.Id\", \"required\": true } }, \"additionalProperties\": false },"
106 "{ \"type\": \"object\", \"properties\": { \"episodeid\": { \"$ref\": \"Library.Id\", \"required\": true } }, \"additionalProperties\": false },"
107 "{ \"type\": \"object\", \"properties\": { \"musicvideoid\": { \"$ref\": \"Library.Id\", \"required\": true } }, \"additionalProperties\": false },"
108 "{ \"type\": \"object\", \"properties\": { \"artistid\": { \"$ref\": \"Library.Id\", \"required\": true } }, \"additionalProperties\": false },"
109 "{ \"type\": \"object\", \"properties\": { \"albumid\": { \"$ref\": \"Library.Id\", \"required\": true } }, \"additionalProperties\": false },"
110 "{ \"type\": \"object\", \"properties\": { \"songid\": { \"$ref\": \"Library.Id\", \"required\": true } }, \"additionalProperties\": false },"
111 "{ \"type\": \"object\", \"properties\": { \"genreid\": { \"$ref\": \"Library.Id\", \"required\": true, \"description\": \"Identification of a genre from the AudioLibrary\" } }, \"additionalProperties\": false }"
115 "\"type\": \"integer\","
121 "\"type\": \"string\","
122 "\"enum\": [ \"video\", \"audio\", \"picture\" ]"
124 "\"Player.Position.Percentage\": {"
125 "\"type\": \"number\","
129 "\"Player.Speed\": {"
130 "\"type\": \"object\","
131 "\"required\": true,"
133 "\"speed\": { \"type\": \"integer\" }"
136 "\"Player.Repeat\": {"
137 "\"type\": \"string\","
138 "\"enum\": [ \"off\", \"one\", \"all\" ]"
140 "\"Player.Audio.Stream\": {"
141 "\"type\": \"object\","
143 "\"index\": { \"type\": \"integer\", \"minimum\": 0, \"required\": true },"
144 "\"name\": { \"type\": \"string\", \"required\": true },"
145 "\"language\": { \"type\": \"string\", \"required\": true }"
148 "\"Player.Audio.Stream.Extended\": {"
149 "\"extends\": \"Player.Audio.Stream\","
151 "\"codec\": { \"type\": \"string\", \"required\": true },"
152 "\"bitrate\": { \"type\": \"integer\", \"required\": true },"
153 "\"channels\": { \"type\": \"integer\", \"required\": true }"
156 "\"Player.Subtitle\": {"
157 "\"type\": \"object\","
159 "\"index\": { \"type\": \"integer\", \"minimum\": 0, \"required\": true },"
160 "\"name\": { \"type\": \"string\", \"required\": true },"
161 "\"language\": { \"type\": \"string\", \"required\": true }"
164 "\"Player.Property.Name\": {"
165 "\"type\": \"string\","
166 "\"enum\": [ \"type\", \"partymode\", \"speed\", \"time\", \"percentage\","
167 "\"totaltime\", \"playlistid\", \"position\", \"repeat\", \"shuffled\","
168 "\"canseek\", \"canchangespeed\", \"canmove\", \"canzoom\", \"canrotate\","
169 "\"canshuffle\", \"canrepeat\", \"currentaudiostream\", \"audiostreams\","
170 "\"subtitleenabled\", \"currentsubtitle\", \"subtitles\" ]"
172 "\"Player.Property.Value\": {"
173 "\"type\": \"object\","
175 "\"type\": { \"$ref\": \"Player.Type\" },"
176 "\"partymode\": { \"type\": \"boolean\" },"
177 "\"speed\": { \"type\": \"integer\" },"
178 "\"time\": { \"$ref\": \"Global.Time\" },"
179 "\"percentage\": { \"$ref\": \"Player.Position.Percentage\" },"
180 "\"totaltime\": { \"$ref\": \"Global.Time\" },"
181 "\"playlistid\": { \"$ref\": \"Playlist.Id\" },"
182 "\"position\": { \"$ref\": \"Playlist.Position\" },"
183 "\"repeat\": { \"$ref\": \"Player.Repeat\" },"
184 "\"shuffled\": { \"type\": \"boolean\" },"
185 "\"canseek\": { \"type\": \"boolean\" },"
186 "\"canchangespeed\": { \"type\": \"boolean\" },"
187 "\"canmove\": { \"type\": \"boolean\" },"
188 "\"canzoom\": { \"type\": \"boolean\" },"
189 "\"canrotate\": { \"type\": \"boolean\" },"
190 "\"canshuffle\": { \"type\": \"boolean\" },"
191 "\"canrepeat\": { \"type\": \"boolean\" },"
192 "\"currentaudiostream\": { \"$ref\": \"Player.Audio.Stream.Extended\" },"
193 "\"audiostreams\": { \"type\": \"array\", \"items\": { \"$ref\": \"Player.Audio.Stream.Extended\" } },"
194 "\"subtitleenabled\": { \"type\": \"boolean\" },"
195 "\"currentsubtitle\": { \"$ref\": \"Player.Subtitle\" },"
196 "\"subtitles\": { \"type\": \"array\", \"items\": { \"$ref\": \"Player.Subtitle\" } }"
199 "\"Player.Notifications.Item.Type\": {"
200 "\"type\": \"string\","
201 "\"enum\": [ \"unknown\", \"movie\", \"episode\", \"musicvideo\", \"song\" ]"
203 "\"Player.Notifications.Item\": {"
205 "{ \"type\": \"object\", \"description\": \"An unknown item does not have any additional information.\","
207 "\"type\": { \"$ref\": \"Player.Notifications.Item.Type\", \"required\": true }"
210 "{ \"type\": \"object\", \"description\": \"An item known to the database has an identification.\","
212 "\"type\": { \"$ref\": \"Player.Notifications.Item.Type\", \"required\": true },"
213 "\"id\": { \"$ref\": \"Library.Id\", \"required\": true }"
216 "{ \"type\": \"object\", \"description\": \"A movie item has a title and may have a release year.\","
218 "\"type\": { \"$ref\": \"Player.Notifications.Item.Type\", \"required\": true },"
219 "\"title\": { \"type\": \"string\", \"required\": true },"
220 "\"year\": { \"type\": \"integer\" }"
223 "{ \"type\": \"object\", \"description\": \"A tv episode has a title and may have an episode number, season number and the title of the show it belongs to.\","
225 "\"type\": { \"$ref\": \"Player.Notifications.Item.Type\", \"required\": true },"
226 "\"title\": { \"type\": \"string\", \"required\": true },"
227 "\"episode\": { \"type\": \"integer\" },"
228 "\"season\": { \"type\": \"integer\" },"
229 "\"showtitle\": { \"type\": \"string\" }"
232 "{ \"type\": \"object\", \"description\": \"A music video has a title and may have an album and an artist.\","
234 "\"type\": { \"$ref\": \"Player.Notifications.Item.Type\", \"required\": true },"
235 "\"title\": { \"type\": \"string\", \"required\": true },"
236 "\"album\": { \"type\": \"string\" },"
237 "\"artist\": { \"type\": \"string\" }"
240 "{ \"type\": \"object\", \"description\": \"A song has a title and may have an album, an artist and a track number.\","
242 "\"type\": { \"$ref\": \"Player.Notifications.Item.Type\", \"required\": true },"
243 "\"title\": { \"type\": \"string\", \"required\": true },"
244 "\"album\": { \"type\": \"string\" },"
245 "\"artist\": { \"type\": \"string\" },"
246 "\"track\": { \"type\": \"integer\" }"
251 "\"Player.Notifications.Player\": {"
252 "\"type\": \"object\","
254 "\"playerid\": { \"$ref\": \"Player.Id\", \"required\": true },"
255 "\"speed\": { \"type\": \"integer\" }"
258 "\"Player.Notifications.Player.Seek\": {"
259 "\"extends\": \"Player.Notifications.Player\","
261 "\"time\": { \"$ref\": \"Global.Time\" },"
262 "\"seekoffset\": { \"$ref\": \"Global.Time\" }"
265 "\"Player.Notifications.Data\": {"
266 "\"type\": \"object\","
268 "\"item\": { \"$ref\": \"Player.Notifications.Item\", \"required\": true },"
269 "\"player\": { \"$ref\": \"Player.Notifications.Player\", \"required\": true }"
272 "\"Item.Fields.Base\": {"
273 "\"type\": \"array\","
274 "\"uniqueItems\": true,"
275 "\"items\": { \"type\": \"string\" }"
277 "\"Item.Details.Base\": {"
278 "\"type\": \"object\","
280 "\"label\": { \"type\": \"string\", \"required\": true }"
283 "\"Media.Details.Base\": {"
284 "\"extends\": \"Item.Details.Base\","
286 "\"fanart\": { \"type\": \"string\" },"
287 "\"thumbnail\": { \"type\": \"string\" }"
290 "\"Library.Fields.Genre\": {"
291 "\"extends\": \"Item.Fields.Base\","
292 "\"items\": { \"type\": \"string\", \"enum\": [ \"title\", \"thumbnail\" ] }"
294 "\"Library.Details.Genre\": {"
295 "\"extends\": \"Item.Details.Base\","
297 "\"genreid\": { \"$ref\": \"Library.Id\", \"required\": true },"
298 "\"title\": { \"type\": \"string\" },"
299 "\"thumbnail\": { \"type\": \"string\" }"
302 "\"Audio.Fields.Artist\": {"
303 "\"extends\": \"Item.Fields.Base\","
304 "\"items\": { \"type\": \"string\","
305 "\"enum\": [ \"instrument\", \"style\", \"mood\", \"born\", \"formed\","
306 "\"description\", \"genre\", \"died\", \"disbanded\","
307 "\"yearsactive\", \"musicbrainzartistid\", \"fanart\","
311 "\"Audio.Fields.Album\": {"
312 "\"extends\": \"Item.Fields.Base\","
313 "\"items\": { \"type\": \"string\","
314 "\"enum\": [ \"title\", \"description\", \"artist\", \"genre\","
315 "\"theme\", \"mood\", \"style\", \"type\", \"albumlabel\","
316 "\"rating\", \"year\", \"musicbrainzalbumid\","
317 "\"musicbrainzalbumartistid\", \"fanart\", \"thumbnail\","
321 "\"Audio.Fields.Song\": {"
322 "\"extends\": \"Item.Fields.Base\","
323 "\"items\": { \"type\": \"string\","
324 "\"enum\": [ \"title\", \"artist\", \"albumartist\", \"genre\", \"year\","
325 "\"rating\", \"album\", \"track\", \"duration\", \"comment\","
326 "\"lyrics\", \"musicbrainztrackid\", \"musicbrainzartistid\","
327 "\"musicbrainzalbumid\", \"musicbrainzalbumartistid\","
328 "\"playcount\", \"fanart\", \"thumbnail\", \"file\", \"artistid\","
332 "\"Audio.Details.Base\": {"
333 "\"extends\": \"Media.Details.Base\","
335 "\"genre\": { \"type\": \"string\" }"
338 "\"Audio.Details.Media\": {"
339 "\"extends\": \"Audio.Details.Base\","
341 "\"title\": { \"type\": \"string\" },"
342 "\"artist\": { \"type\": \"string\" },"
343 "\"year\": { \"type\": \"integer\" },"
344 "\"rating\": { \"type\": \"integer\" },"
345 "\"musicbrainzalbumid\": { \"type\": \"string\" },"
346 "\"musicbrainzalbumartistid\": { \"type\": \"string\" }"
349 "\"Audio.Details.Artist\": {"
350 "\"extends\": \"Audio.Details.Base\","
352 "\"artistid\": { \"$ref\": \"Library.Id\", \"required\": true },"
353 "\"artist\": { \"type\": \"string\", \"required\": true },"
354 "\"instrument\": { \"type\": \"string\" },"
355 "\"style\": { \"type\": \"string\" },"
356 "\"mood\": { \"type\": \"string\" },"
357 "\"born\": { \"type\": \"string\" },"
358 "\"formed\": { \"type\": \"string\" },"
359 "\"description\": { \"type\": \"string\" },"
360 "\"died\": { \"type\": \"string\" },"
361 "\"disbanded\": { \"type\": \"string\" },"
362 "\"yearsactive\": { \"type\": \"string\" },"
363 "\"musicbrainzartistid\": { \"type\": \"string\" }"
366 "\"Audio.Details.Album\": {"
367 "\"extends\": \"Audio.Details.Media\","
369 "\"albumid\": { \"$ref\": \"Library.Id\", \"required\": true },"
370 "\"description\": { \"type\": \"string\" },"
371 "\"theme\": { \"type\": \"string\" },"
372 "\"mood\": { \"type\": \"string\" },"
373 "\"style\": { \"type\": \"string\" },"
374 "\"type\": { \"type\": \"string\" },"
375 "\"albumlabel\": { \"type\": \"string\" },"
376 "\"artistid\": { \"$ref\": \"Library.Id\" }"
379 "\"Audio.Details.Song\": {"
380 "\"extends\": \"Audio.Details.Media\","
382 "\"songid\": { \"$ref\": \"Library.Id\", \"required\": true },"
383 "\"file\": { \"type\": \"string\" },"
384 "\"albumartist\": { \"type\": \"string\" },"
385 "\"album\": { \"type\": \"string\" },"
386 "\"track\": { \"type\": \"integer\" },"
387 "\"duration\": { \"type\": \"integer\" },"
388 "\"comment\": { \"type\": \"string\" },"
389 "\"lyrics\": { \"type\": \"string\" },"
390 "\"playcount\": { \"type\": \"integer\" },"
391 "\"musicbrainztrackid\": { \"type\": \"string\" },"
392 "\"musicbrainzartistid\": { \"type\": \"string\" },"
393 "\"artistid\": { \"$ref\": \"Library.Id\" },"
394 "\"albumid\": { \"$ref\": \"Library.Id\" }"
397 "\"Video.Fields.Movie\": {"
398 "\"extends\": \"Item.Fields.Base\","
399 "\"items\": { \"type\": \"string\","
400 "\"description\": \"Requesting the cast, set, showling and/or resume field will result in increased response times\","
401 "\"enum\": [ \"title\", \"genre\", \"year\", \"rating\", \"director\", \"trailer\","
402 "\"tagline\", \"plot\", \"plotoutline\", \"originaltitle\", \"lastplayed\","
403 "\"playcount\", \"writer\", \"studio\", \"mpaa\", \"cast\", \"country\","
404 "\"imdbnumber\", \"premiered\", \"productioncode\", \"runtime\", \"set\","
405 "\"showlink\", \"streamdetails\", \"top250\", \"votes\", \"fanart\","
406 "\"thumbnail\", \"file\", \"sorttitle\", \"resume\", \"setid\" ]"
409 "\"Video.Fields.MovieSet\": {"
410 "\"extends\": \"Item.Fields.Base\","
411 "\"items\": { \"type\": \"string\","
412 "\"enum\": [ \"title\", \"playcount\", \"fanart\", \"thumbnail\" ]"
415 "\"Video.Fields.TVShow\": {"
416 "\"extends\": \"Item.Fields.Base\","
417 "\"items\": { \"type\": \"string\","
418 "\"description\": \"Requesting the cast field will result in increased response times\","
419 "\"enum\": [ \"title\", \"genre\", \"year\", \"rating\", \"plot\","
420 "\"studio\", \"mpaa\", \"cast\", \"playcount\", \"episode\","
421 "\"imdbnumber\", \"premiered\", \"votes\", \"lastplayed\","
422 "\"fanart\", \"thumbnail\", \"file\", \"originaltitle\","
423 "\"sorttitle\", \"episodeguide\" ]"
426 "\"Video.Fields.Season\": {"
427 "\"extends\": \"Item.Fields.Base\","
428 "\"items\": { \"type\": \"string\","
429 "\"enum\": [ \"season\", \"showtitle\", \"playcount\", \"episode\", \"fanart\", \"thumbnail\", \"tvshowid\" ]"
432 "\"Video.Fields.Episode\": {"
433 "\"extends\": \"Item.Fields.Base\","
434 "\"items\": { \"type\": \"string\","
435 "\"description\": \"Requesting the cast and/or resume field will result in increased response times\","
436 "\"enum\": [ \"title\", \"plot\", \"votes\", \"rating\", \"writer\","
437 "\"firstaired\", \"playcount\", \"runtime\", \"director\","
438 "\"productioncode\", \"season\", \"episode\", \"originaltitle\","
439 "\"showtitle\", \"cast\", \"streamdetails\", \"lastplayed\", \"fanart\","
440 "\"thumbnail\", \"file\", \"resume\", \"tvshowid\" ]"
443 "\"Video.Fields.MusicVideo\": {"
444 "\"extends\": \"Item.Fields.Base\","
445 "\"items\": { \"type\": \"string\","
446 "\"description\": \"Requesting the resume field will result in increased response times\","
447 "\"enum\": [ \"title\", \"playcount\", \"runtime\", \"director\","
448 "\"studio\", \"year\", \"plot\", \"album\", \"artist\","
449 "\"genre\", \"track\", \"streamdetails\", \"lastplayed\","
450 "\"fanart\", \"thumbnail\", \"file\", \"resume\" ]"
454 "\"type\": \"array\","
455 "\"items\": { \"type\": \"object\","
457 "\"name\": { \"type\": \"string\", \"required\": true },"
458 "\"role\": { \"type\": \"string\", \"required\": true },"
459 "\"thumbnail\": { \"type\": \"string\" }"
461 "\"additionalProperties\": false"
464 "\"Video.Streams\": {"
465 "\"type\": \"object\","
467 "\"audio\": { \"type\": \"array\", \"minItems\": 1,"
468 "\"items\": { \"type\": \"object\","
470 "\"codec\": { \"type\": \"string\" },"
471 "\"language\": { \"type\": \"string\" },"
472 "\"channels\": { \"type\": \"integer\" }"
474 "\"additionalProperties\": false"
477 "\"video\": { \"type\": \"array\", \"minItems\": 1,"
478 "\"items\": { \"type\": \"object\","
480 "\"codec\": { \"type\": \"string\" },"
481 "\"aspect\": { \"type\": \"number\" },"
482 "\"width\": { \"type\": \"integer\" },"
483 "\"height\": { \"type\": \"integer\" },"
484 "\"duration\": { \"type\": \"integer\" }"
486 "\"additionalProperties\": false"
489 "\"subtitle\": { \"type\": \"array\", \"minItems\": 1,"
490 "\"items\": { \"type\": \"object\","
492 "\"language\": { \"type\": \"string\" }"
494 "\"additionalProperties\": false"
498 "\"additionalProperties\": false"
500 "\"Video.Resume\": {"
501 "\"type\": \"object\","
503 "\"position\": { \"type\": \"number\", \"minimum\": 0 },"
504 "\"total\": { \"type\": \"number\", \"minimum\": 0 }"
506 "\"additionalProperties\": false"
508 "\"Video.Details.Base\": {"
509 "\"extends\": \"Media.Details.Base\","
511 "\"playcount\": { \"type\": \"integer\" }"
514 "\"Video.Details.Media\": {"
515 "\"extends\": \"Video.Details.Base\","
517 "\"title\": { \"type\": \"string\" }"
520 "\"Video.Details.Item\": {"
521 "\"extends\": \"Video.Details.Media\","
523 "\"file\": { \"type\": \"string\" },"
524 "\"plot\": { \"type\": \"string\" },"
525 "\"lastplayed\": { \"type\": \"string\" }"
528 "\"Video.Details.File\": {"
529 "\"extends\": \"Video.Details.Item\","
531 "\"runtime\": { \"type\": \"string\" },"
532 "\"director\": { \"type\": \"string\" },"
533 "\"streamdetails\": { \"$ref\": \"Video.Streams\" },"
534 "\"resume\": { \"$ref\": \"Video.Resume\" }"
537 "\"Video.Details.Movie\": {"
538 "\"extends\": \"Video.Details.File\","
540 "\"movieid\": { \"$ref\": \"Library.Id\", \"required\": true },"
541 "\"genre\": { \"type\": \"string\" },"
542 "\"year\": { \"type\": \"integer\" },"
543 "\"rating\": { \"type\": \"number\" },"
544 "\"trailer\": { \"type\": \"string\" },"
545 "\"tagline\": { \"type\": \"string\" },"
546 "\"plotoutline\": { \"type\": \"string\" },"
547 "\"originaltitle\": { \"type\": \"string\" },"
548 "\"sorttitle\": { \"type\": \"string\" },"
549 "\"writer\": { \"type\": \"string\" },"
550 "\"studio\": { \"type\": \"string\" },"
551 "\"mpaa\": { \"type\": \"string\" },"
552 "\"cast\": { \"$ref\": \"Video.Cast\" },"
553 "\"country\": { \"type\": \"string\" },"
554 "\"imdbnumber\": { \"type\": \"string\" },"
555 "\"premiered\": { \"type\": \"string\" },"
556 "\"productioncode\": { \"type\": \"string\" },"
557 "\"set\": { \"$ref\": \"Array.String\" },"
558 "\"showlink\": { \"type\": \"string\" },"
559 "\"top250\": { \"type\": \"integer\" },"
560 "\"votes\": { \"type\": \"string\" },"
561 "\"setid\": { \"$ref\": \"Array.Integer\" }"
564 "\"Video.Details.MovieSet\": {"
565 "\"extends\": \"Video.Details.Media\","
567 "\"setid\": { \"$ref\": \"Library.Id\", \"required\": true }"
570 "\"Video.Details.MovieSet.Extended\": {"
571 "\"extends\": \"Video.Details.MovieSet\","
573 "\"movies\": { \"type\": \"array\","
574 "\"items\": { \"$ref\": \"Video.Details.Movie\" }"
578 "\"Video.Details.TVShow\": {"
579 "\"extends\": \"Video.Details.Item\","
581 "\"tvshowid\": { \"$ref\": \"Library.Id\", \"required\": true },"
582 "\"genre\": { \"type\": \"string\" },"
583 "\"year\": { \"type\": \"integer\" },"
584 "\"rating\": { \"type\": \"number\" },"
585 "\"originaltitle\": { \"type\": \"string\" },"
586 "\"sorttitle\": { \"type\": \"string\" },"
587 "\"studio\": { \"type\": \"string\" },"
588 "\"mpaa\": { \"type\": \"string\" },"
589 "\"cast\": { \"$ref\": \"Video.Cast\" },"
590 "\"episode\": { \"type\": \"integer\" },"
591 "\"imdbnumber\": { \"type\": \"string\" },"
592 "\"premiered\": { \"type\": \"string\" },"
593 "\"votes\": { \"type\": \"string\" },"
594 "\"episodeguide\": { \"type\": \"string\" }"
597 "\"Video.Details.Season\": {"
598 "\"extends\": \"Video.Details.Base\","
600 "\"season\": { \"type\": \"integer\", \"required\": true },"
601 "\"showtitle\": { \"type\": \"string\" },"
602 "\"episode\": { \"type\": \"integer\" },"
603 "\"tvshowid\": { \"$ref\": \"Library.Id\" }"
606 "\"Video.Details.Episode\": {"
607 "\"extends\": \"Video.Details.File\","
609 "\"episodeid\": { \"$ref\": \"Library.Id\", \"required\": true },"
610 "\"votes\": { \"type\": \"string\" },"
611 "\"rating\": { \"type\": \"number\" },"
612 "\"writer\": { \"type\": \"string\" },"
613 "\"firstaired\": { \"type\": \"string\" },"
614 "\"productioncode\": { \"type\": \"string\" },"
615 "\"season\": { \"type\": \"integer\" },"
616 "\"episode\": { \"type\": \"integer\" },"
617 "\"originaltitle\": { \"type\": \"string\" },"
618 "\"showtitle\": { \"type\": \"string\" },"
619 "\"cast\": { \"$ref\": \"Video.Cast\" },"
620 "\"tvshowid\": { \"$ref\": \"Library.Id\" }"
623 "\"Video.Details.MusicVideo\": {"
624 "\"extends\": \"Video.Details.File\","
626 "\"musicvideoid\": { \"$ref\": \"Library.Id\", \"required\": true },"
627 "\"studio\": { \"type\": \"string\" },"
628 "\"year\": { \"type\": \"integer\" },"
629 "\"album\": { \"type\": \"string\" },"
630 "\"artist\": { \"type\": \"string\" },"
631 "\"genre\": { \"type\": \"string\" },"
632 "\"track\": { \"type\": \"integer\" }"
636 "\"type\": \"string\","
637 "\"enum\": [ \"video\", \"music\", \"pictures\", \"files\", \"programs\" ]"
640 "\"type\": \"integer\","
645 "\"type\": \"object\","
647 "\"start\": { \"type\": \"integer\", \"minimum\": 0, \"default\": 0 },"
648 "\"end\": { \"type\": \"integer\", \"minimum\": 0, \"default\": -1 }"
650 "\"additionalProperties\": false"
653 "\"type\": \"object\","
655 "\"method\": { \"type\": \"string\", \"default\": \"none\","
656 "\"enum\": [ \"none\", \"label\", \"date\", \"size\", \"file\", \"drivetype\", \"track\", \"duration\", \"title\", \"artist\","
657 "\"album\", \"genre\", \"year\", \"videorating\", \"programcount\", \"playlist\", \"episode\", \"videotitle\","
658 "\"sorttitle\", \"productioncode\", \"songrating\", \"mpaarating\", \"videoruntime\", \"studio\", \"fullpath\","
659 "\"lastplayed\", \"unsorted\", \"max\" ]"
661 "\"order\": { \"type\": \"string\", \"default\": \"ascending\", \"enum\": [ \"ascending\", \"descending\" ] },"
662 "\"ignorearticle\": { \"type\": \"boolean\", \"default\": false }"
665 "\"List.LimitsReturned\": {"
666 "\"type\": \"object\","
668 "\"start\": { \"type\": \"integer\", \"minimum\": 0, \"default\": 0 },"
669 "\"end\": { \"type\": \"integer\", \"minimum\": 0, \"default\": -1 },"
670 "\"total\": { \"type\": \"integer\", \"minimum\": 0, \"required\": true }"
672 "\"additionalProperties\": false"
674 "\"List.Fields.All\": {"
675 "\"extends\": \"Item.Fields.Base\","
676 "\"items\": { \"type\": \"string\","
677 "\"enum\": [ \"title\", \"artist\", \"albumartist\", \"genre\", \"year\", \"rating\","
678 "\"album\", \"track\", \"duration\", \"comment\", \"lyrics\", \"musicbrainztrackid\","
679 "\"musicbrainzartistid\", \"musicbrainzalbumid\", \"musicbrainzalbumartistid\","
680 "\"playcount\", \"fanart\", \"director\", \"trailer\", \"tagline\", \"plot\","
681 "\"plotoutline\", \"originaltitle\", \"lastplayed\", \"writer\", \"studio\","
682 "\"mpaa\", \"cast\", \"country\", \"imdbnumber\", \"premiered\", \"productioncode\","
683 "\"runtime\", \"set\", \"showlink\", \"streamdetails\", \"top250\", \"votes\","
684 "\"firstaired\", \"season\", \"episode\", \"showtitle\", \"thumbnail\", \"file\","
685 "\"resume\", \"artistid\", \"albumid\", \"tvshowid\", \"setid\" ]"
688 "\"List.Item.All\": {"
689 "\"extends\": [ \"Video.Details.File\", \"Audio.Details.Media\" ],"
691 "\"id\": { \"$ref\": \"Library.Id\" },"
692 "\"type\": { \"type\": \"string\", \"enum\": [ \"unknown\", \"movie\", \"episode\", \"musicvideo\", \"song\", \"picture\" ] },"
693 "\"albumartist\": { \"type\": \"string\" },"
694 "\"album\": { \"type\": \"string\" },"
695 "\"track\": { \"type\": \"integer\" },"
696 "\"duration\": { \"type\": \"integer\" },"
697 "\"comment\": { \"type\": \"string\" },"
698 "\"lyrics\": { \"type\": \"string\" },"
699 "\"musicbrainztrackid\": { \"type\": \"string\" },"
700 "\"musicbrainzartistid\": { \"type\": \"string\" },"
701 "\"trailer\": { \"type\": \"string\" },"
702 "\"tagline\": { \"type\": \"string\" },"
703 "\"plotoutline\": { \"type\": \"string\" },"
704 "\"originaltitle\": { \"type\": \"string\" },"
705 "\"writer\": { \"type\": \"string\" },"
706 "\"studio\": { \"type\": \"string\" },"
707 "\"mpaa\": { \"type\": \"string\" },"
708 "\"cast\": { \"$ref\": \"Video.Cast\" },"
709 "\"country\": { \"type\": \"string\" },"
710 "\"imdbnumber\": { \"type\": \"string\" },"
711 "\"premiered\": { \"type\": \"string\" },"
712 "\"productioncode\": { \"type\": \"string\" },"
713 "\"set\": { \"$ref\": \"Array.String\" },"
714 "\"showlink\": { \"type\": \"string\" },"
715 "\"top250\": { \"type\": \"integer\" },"
716 "\"votes\": { \"type\": \"string\" },"
717 "\"firstaired\": { \"type\": \"string\" },"
718 "\"season\": { \"type\": \"integer\" },"
719 "\"episode\": { \"type\": \"integer\" },"
720 "\"showtitle\": { \"type\": \"string\" },"
721 "\"artistid\": { \"$ref\": \"Library.Id\" },"
722 "\"albumid\": { \"$ref\": \"Library.Id\" },"
723 "\"setid\": { \"$ref\": \"Array.Integer\" },"
724 "\"tvshowid\": { \"$ref\": \"Library.Id\" }"
727 "\"List.Item.File\": {"
728 "\"extends\": \"List.Item.All\","
730 "\"file\": { \"type\": \"string\", \"required\": true },"
731 "\"filetype\": { \"type\": \"string\", \"enum\": [ \"file\", \"directory\" ], \"required\": true }"
734 "\"List.Items.Sources\": {"
735 "\"type\": \"array\","
737 "\"extends\": \"Item.Details.Base\","
739 "\"file\": { \"type\": \"string\", \"required\": true }"
743 "\"System.Property.Name\": {"
744 "\"type\": \"string\","
745 "\"enum\": [ \"canshutdown\", \"cansuspend\", \"canhibernate\", \"canreboot\" ]"
747 "\"System.Property.Value\": {"
748 "\"type\": \"object\","
750 "\"canshutdown\": { \"type\": \"boolean\" },"
751 "\"cansuspend\": { \"type\": \"boolean\" },"
752 "\"canhibernate\": { \"type\": \"boolean\" },"
753 "\"canreboot\": { \"type\": \"boolean\" }"
756 "\"Application.Property.Name\": {"
757 "\"type\": \"string\","
758 "\"enum\": [ \"volume\", \"muted\", \"name\", \"version\" ]"
760 "\"Application.Property.Value\": {"
761 "\"type\": \"object\","
763 "\"volume\": { \"type\": \"integer\" },"
764 "\"muted\": { \"type\": \"boolean\" },"
765 "\"name\": { \"type\": \"string\", \"minLength\": 1 },"
766 "\"version\": { \"type\": \"object\","
768 "\"major\": { \"type\": \"integer\", \"minimum\": 0, \"required\": true },"
769 "\"minor\": { \"type\": \"integer\", \"minimum\": 0, \"required\": true },"
770 "\"revision\": { \"type\": [ \"string\", \"integer\" ] },"
771 "\"tag\": { \"type\": \"string\", \"enum\": [ \"prealpha\", \"alpha\", \"beta\", \"releasecandidate\", \"stable\" ], \"required\": true }"
778 const char* const JSONRPC_SERVICE_METHODS[] = {
779 "\"JSONRPC.Introspect\": {"
780 "\"type\": \"method\","
781 "\"description\": \"Enumerates all actions and descriptions\","
782 "\"transport\": \"Response\","
783 "\"permission\": \"ReadData\","
785 "{ \"name\": \"getdescriptions\", \"type\": \"boolean\", \"default\": true },"
786 "{ \"name\": \"getmetadata\", \"type\": \"boolean\", \"default\": false },"
787 "{ \"name\": \"filterbytransport\", \"type\": \"boolean\", \"default\": true },"
788 "{ \"name\": \"filter\", \"type\": \"object\","
790 "\"id\": { \"type\": \"string\", \"required\": true, \"description\": \"Name of a namespace, method or type\" },"
791 "\"type\": { \"type\": \"string\", \"required\": true, \"enum\": [ \"method\", \"namespace\", \"type\", \"notification\" ], \"description\": \"Type of the given name\" },"
792 "\"getreferences\": { \"type\": \"boolean\", \"default\": true, \"description\": \"Whether or not to print the schema for referenced types\" }"
796 "\"returns\": \"object\""
798 "\"JSONRPC.Version\": {"
799 "\"type\": \"method\","
800 "\"description\": \"Retrieve the jsonrpc protocol version\","
801 "\"transport\": \"Response\","
802 "\"permission\": \"ReadData\","
804 "\"returns\": \"string\""
806 "\"JSONRPC.Permission\": {"
807 "\"type\": \"method\","
808 "\"description\": \"Retrieve the clients permissions\","
809 "\"transport\": \"Response\","
810 "\"permission\": \"ReadData\","
813 "\"type\": \"object\","
815 "\"ReadData\": { \"type\": \"boolean\", \"required\": true },"
816 "\"ControlPlayback\": { \"type\": \"boolean\", \"required\": true },"
817 "\"ControlNotify\": { \"type\": \"boolean\", \"required\": true },"
818 "\"ControlPower\": { \"type\": \"boolean\", \"required\": true },"
819 "\"UpdateData\": { \"type\": \"boolean\", \"required\": true },"
820 "\"RemoveData\": { \"type\": \"boolean\", \"required\": true },"
821 "\"Navigate\": { \"type\": \"boolean\", \"required\": true },"
822 "\"WriteFile\": { \"type\": \"boolean\", \"required\": true }"
826 "\"JSONRPC.Ping\": {"
827 "\"type\": \"method\","
828 "\"description\": \"Ping responder\","
829 "\"transport\": \"Response\","
830 "\"permission\": \"ReadData\","
832 "\"returns\": \"string\""
834 "\"JSONRPC.GetConfiguration\": {"
835 "\"type\": \"method\","
836 "\"description\": \"Get client-specific configurations\","
837 "\"transport\": \"Announcing\","
838 "\"permission\": \"ReadData\","
840 "\"returns\": { \"$ref\": \"Configuration\" }"
842 "\"JSONRPC.SetConfiguration\": {"
843 "\"type\": \"method\","
844 "\"description\": \"Change the client-specific configuration\","
845 "\"transport\": \"Announcing\","
846 "\"permission\": \"ControlNotify\","
848 "{ \"name\": \"notifications\", \"type\": \"object\","
850 "\"Player\": { \"$ref\": \"Optional.Boolean\" },"
851 "\"GUI\": { \"$ref\": \"Optional.Boolean\" },"
852 "\"System\": { \"$ref\": \"Optional.Boolean\" },"
853 "\"AudioLibrary\": { \"$ref\": \"Optional.Boolean\" },"
854 "\"VideoLibrary\": { \"$ref\": \"Optional.Boolean\" },"
855 "\"Other\": { \"$ref\": \"Optional.Boolean\" }"
859 "\"returns\": { \"$ref\": \"Configuration\" }"
861 "\"JSONRPC.NotifyAll\": {"
862 "\"type\": \"method\","
863 "\"description\": \"Notify all other connected clients\","
864 "\"transport\": \"Response\","
865 "\"permission\": \"ReadData\","
867 "{ \"name\": \"sender\", \"type\": \"string\", \"required\": true },"
868 "{ \"name\": \"message\", \"type\": \"string\", \"required\": true },"
869 "{ \"name\": \"data\", \"type\": \"any\", \"default\": null }"
871 "\"returns\": \"any\""
874 "\"type\": \"method\","
875 "\"description\": \"Start playback of either the playlist with the given ID, a slideshow with the pictures from the given directory or a single file or an item from the database.\","
876 "\"transport\": \"Response\","
877 "\"permission\": \"ControlPlayback\","
879 "{ \"name\": \"item\", "
881 "{ \"type\": \"object\", \"required\": true, \"additionalProperties\": false,"
883 "\"playlistid\": { \"$ref\": \"Playlist.Id\", \"required\": true },"
884 "\"position\": { \"$ref\": \"Playlist.Position\", \"default\": 0 }"
887 "{ \"$ref\": \"Playlist.Item\", \"required\": true },"
888 "{ \"type\": \"object\", \"required\": true, \"additionalProperties\": false,"
890 "\"path\": { \"type\": \"string\", \"required\": true },"
891 "\"random\": { \"type\": \"boolean\", \"default\": true },"
892 "\"recursive\": { \"type\": \"boolean\", \"default\": true }"
898 "\"returns\": \"string\""
900 "\"Player.GetActivePlayers\": {"
901 "\"type\": \"method\","
902 "\"description\": \"Returns all active players\","
903 "\"transport\": \"Response\","
904 "\"permission\": \"ReadData\","
907 "\"type\": \"array\","
908 "\"uniqueItems\": true,"
910 "\"type\": \"object\","
912 "\"playerid\": { \"$ref\": \"Player.Id\", \"required\": true },"
913 "\"type\": { \"$ref\": \"Player.Type\", \"required\": true }"
918 "\"Player.GetProperties\": {"
919 "\"type\": \"method\","
920 "\"description\": \"Retrieves the values of the given properties\","
921 "\"transport\": \"Response\","
922 "\"permission\": \"ReadData\","
924 "{ \"name\": \"playerid\", \"$ref\": \"Player.Id\", \"required\": true },"
925 "{ \"name\": \"properties\", \"type\": \"array\", \"uniqueItems\": true, \"required\": true, \"items\": { \"$ref\": \"Player.Property.Name\" } }"
927 "\"returns\": { \"$ref\": \"Player.Property.Value\", \"required\": true }"
929 "\"Player.GetItem\": {"
930 "\"type\": \"method\","
931 "\"description\": \"Retrieves the currently played item\","
932 "\"transport\": \"Response\","
933 "\"permission\": \"ReadData\","
935 "{ \"name\": \"playerid\", \"$ref\": \"Player.Id\", \"required\": true },"
936 "{ \"name\": \"properties\", \"$ref\": \"List.Fields.All\" }"
938 "\"returns\": { \"type\": \"object\","
940 "\"item\": { \"$ref\": \"List.Item.All\", \"required\": true }"
944 "\"Player.PlayPause\": {"
945 "\"type\": \"method\","
946 "\"description\": \"Pauses or unpause playback and returns the new state\","
947 "\"transport\": \"Response\","
948 "\"permission\": \"ControlPlayback\","
950 "{ \"name\": \"playerid\", \"$ref\": \"Player.Id\", \"required\": true }"
952 "\"returns\": { \"$ref\": \"Player.Speed\" }"
955 "\"type\": \"method\","
956 "\"description\": \"Stops playback\","
957 "\"transport\": \"Response\","
958 "\"permission\": \"ControlPlayback\","
960 "{ \"name\": \"playerid\", \"$ref\": \"Player.Id\", \"required\": true }"
962 "\"returns\": \"string\""
964 "\"Player.SetSpeed\": {"
965 "\"type\": \"method\","
966 "\"description\": \"Set the speed of the current playback\","
967 "\"transport\": \"Response\","
968 "\"permission\": \"ControlPlayback\","
970 "{ \"name\": \"playerid\", \"$ref\": \"Player.Id\", \"required\": true },"
971 "{ \"name\": \"speed\", \"type\": [ \"integer\", \"string\" ], \"enum\": [ -32, -16, -8, -4, -2, -1, 0, 1, 2, 4, 8, 16, 32, \"increment\", \"decrement\" ], \"required\": true }"
973 "\"returns\": { \"$ref\": \"Player.Speed\" }"
976 "\"type\": \"method\","
977 "\"description\": \"Seek through the playing item\","
978 "\"transport\": \"Response\","
979 "\"permission\": \"ControlPlayback\","
981 "{ \"name\": \"playerid\", \"$ref\": \"Player.Id\", \"required\": true },"
982 "{ \"name\": \"value\", \"required\": true, \"type\": ["
983 "{ \"$ref\": \"Player.Position.Percentage\", \"required\": true, \"description\": \"Percentage value to seek to\" },"
984 "{ \"type\": \"object\", \"additionalProperties\": false, \"required\": true, \"description\": \"Time to seek to\","
986 "\"hours\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 23 },"
987 "\"minutes\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 59 },"
988 "\"seconds\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 59 },"
989 "\"milliseconds\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 999 }"
992 "{ \"type\": \"string\", \"enum\": [ \"smallforward\", \"smallbackward\", \"bigforward\", \"bigbackward\" ], \"required\": true, \"description\": \"Seek by predefined jumps\" }"
997 "\"type\": \"object\","
999 "\"percentage\": { \"$ref\": \"Player.Position.Percentage\" },"
1000 "\"time\": { \"$ref\": \"Global.Time\" },"
1001 "\"totaltime\": { \"$ref\": \"Global.Time\" }"
1005 "\"Player.MoveLeft\": {"
1006 "\"type\": \"method\","
1007 "\"description\": \"If picture is zoomed move viewport left otherwise skip previous\","
1008 "\"transport\": \"Response\","
1009 "\"permission\": \"ControlPlayback\","
1011 "{ \"name\": \"playerid\", \"$ref\": \"Player.Id\", \"required\": true }"
1013 "\"returns\": \"string\""
1015 "\"Player.MoveRight\": {"
1016 "\"type\": \"method\","
1017 "\"description\": \"If picture is zoomed move viewport right otherwise skip next\","
1018 "\"transport\": \"Response\","
1019 "\"permission\": \"ControlPlayback\","
1021 "{ \"name\": \"playerid\", \"$ref\": \"Player.Id\", \"required\": true }"
1023 "\"returns\": \"string\""
1025 "\"Player.MoveDown\": {"
1026 "\"type\": \"method\","
1027 "\"description\": \"If picture is zoomed move viewport down\","
1028 "\"transport\": \"Response\","
1029 "\"permission\": \"ControlPlayback\","
1031 "{ \"name\": \"playerid\", \"$ref\": \"Player.Id\", \"required\": true }"
1033 "\"returns\": \"string\""
1035 "\"Player.MoveUp\": {"
1036 "\"type\": \"method\","
1037 "\"description\": \"If picture is zoomed move viewport up\","
1038 "\"transport\": \"Response\","
1039 "\"permission\": \"ControlPlayback\","
1041 "{ \"name\": \"playerid\", \"$ref\": \"Player.Id\", \"required\": true }"
1043 "\"returns\": \"string\""
1045 "\"Player.ZoomOut\": {"
1046 "\"type\": \"method\","
1047 "\"description\": \"Zoom out once\","
1048 "\"transport\": \"Response\","
1049 "\"permission\": \"ControlPlayback\","
1051 "{ \"name\": \"playerid\", \"$ref\": \"Player.Id\", \"required\": true }"
1053 "\"returns\": \"string\""
1055 "\"Player.ZoomIn\": {"
1056 "\"type\": \"method\","
1057 "\"description\": \"Zoom in once\","
1058 "\"transport\": \"Response\","
1059 "\"permission\": \"ControlPlayback\","
1061 "{ \"name\": \"playerid\", \"$ref\": \"Player.Id\", \"required\": true }"
1063 "\"returns\": \"string\""
1065 "\"Player.Zoom\": {"
1066 "\"type\": \"method\","
1067 "\"description\": \"Zooms current picture\","
1068 "\"transport\": \"Response\","
1069 "\"permission\": \"ControlPlayback\","
1071 "{ \"name\": \"playerid\", \"$ref\": \"Player.Id\", \"required\": true },"
1072 "{ \"name\": \"value\", \"type\": \"integer\", \"required\": true, \"minimum\": 1, \"maximum\": 10, \"description\": \"Zoom level\" }"
1074 "\"returns\": \"string\""
1076 "\"Player.Rotate\": {"
1077 "\"type\": \"method\","
1078 "\"description\": \"Rotates current picture\","
1079 "\"transport\": \"Response\","
1080 "\"permission\": \"ControlPlayback\","
1082 "{ \"name\": \"playerid\", \"$ref\": \"Player.Id\", \"required\": true }"
1084 "\"returns\": \"string\""
1086 "\"Player.GoPrevious\": {"
1087 "\"type\": \"method\","
1088 "\"description\": \"Go to previous item on the playlist\","
1089 "\"transport\": \"Response\","
1090 "\"permission\": \"ControlPlayback\","
1092 "{ \"name\": \"playerid\", \"$ref\": \"Player.Id\", \"required\": true }"
1094 "\"returns\": \"string\""
1096 "\"Player.GoNext\": {"
1097 "\"type\": \"method\","
1098 "\"description\": \"Go to next item on the playlist\","
1099 "\"transport\": \"Response\","
1100 "\"permission\": \"ControlPlayback\","
1102 "{ \"name\": \"playerid\", \"$ref\": \"Player.Id\", \"required\": true }"
1104 "\"returns\": \"string\""
1106 "\"Player.GoTo\": {"
1107 "\"type\": \"method\","
1108 "\"description\": \"Go to item at the given position in the playlist\","
1109 "\"transport\": \"Response\","
1110 "\"permission\": \"ControlPlayback\","
1112 "{ \"name\": \"playerid\", \"$ref\": \"Player.Id\", \"required\": true },"
1113 "{ \"name\": \"position\", \"$ref\": \"Playlist.Position\", \"required\": true }"
1115 "\"returns\": \"string\""
1117 "\"Player.Shuffle\": {"
1118 "\"type\": \"method\","
1119 "\"description\": \"Shuffle items in the player\","
1120 "\"transport\": \"Response\","
1121 "\"permission\": \"ControlPlayback\","
1123 "{ \"name\": \"playerid\", \"$ref\": \"Player.Id\", \"required\": true }"
1125 "\"returns\": \"string\""
1127 "\"Player.UnShuffle\": {"
1128 "\"type\": \"method\","
1129 "\"description\": \"Unshuffle items in the player\","
1130 "\"transport\": \"Response\","
1131 "\"permission\": \"ControlPlayback\","
1133 "{ \"name\": \"playerid\", \"$ref\": \"Player.Id\", \"required\": true }"
1135 "\"returns\": \"string\""
1137 "\"Player.Repeat\": {"
1138 "\"type\": \"method\","
1139 "\"description\": \"Set the repeat mode of the player\","
1140 "\"transport\": \"Response\","
1141 "\"permission\": \"ControlPlayback\","
1143 "{ \"name\": \"playerid\", \"$ref\": \"Player.Id\", \"required\": true },"
1144 "{ \"name\": \"state\", \"$ref\": \"Player.Repeat\", \"required\": true }"
1146 "\"returns\": \"string\""
1148 "\"Player.SetAudioStream\": {"
1149 "\"type\": \"method\","
1150 "\"description\": \"Set the audio stream played by the player\","
1151 "\"transport\": \"Response\","
1152 "\"permission\": \"ControlPlayback\","
1154 "{ \"name\": \"playerid\", \"$ref\": \"Player.Id\", \"required\": true },"
1155 "{ \"name\": \"stream\", \"required\": true, \"type\": ["
1156 "{ \"type\": \"string\", \"enum\": [ \"previous\", \"next\" ] },"
1157 "{ \"type\": \"integer\", \"minimum\": 0, \"description\": \"Index of the audio stream to play\" }"
1161 "\"returns\": \"string\""
1163 "\"Player.SetSubtitle\": {"
1164 "\"type\": \"method\","
1165 "\"description\": \"Set the subtitle displayed by the player\","
1166 "\"transport\": \"Response\","
1167 "\"permission\": \"ControlPlayback\","
1169 "{ \"name\": \"playerid\", \"$ref\": \"Player.Id\", \"required\": true },"
1170 "{ \"name\": \"subtitle\", \"required\": true, \"type\": ["
1171 "{ \"type\": \"string\", \"enum\": [ \"previous\", \"next\", \"off\", \"on\" ] },"
1172 "{ \"type\": \"integer\", \"minimum\": 0, \"description\": \"Index of the subtitle to display\" }"
1176 "\"returns\": \"string\""
1178 "\"Playlist.GetPlaylists\": {"
1179 "\"type\": \"method\","
1180 "\"description\": \"Returns all existing playlists\","
1181 "\"transport\": \"Response\","
1182 "\"permission\": \"ReadData\","
1185 "\"type\": \"array\","
1186 "\"uniqueItems\": true,"
1188 "\"type\": \"object\","
1190 "\"playlistid\": { \"$ref\": \"Playlist.Id\", \"required\": true },"
1191 "\"type\": { \"$ref\": \"Playlist.Type\", \"required\": true }"
1196 "\"Playlist.GetProperties\": {"
1197 "\"type\": \"method\","
1198 "\"description\": \"Retrieves the values of the given properties\","
1199 "\"transport\": \"Response\","
1200 "\"permission\": \"ReadData\","
1202 "{ \"name\": \"playlistid\", \"$ref\": \"Playlist.Id\", \"required\": true },"
1203 "{ \"name\": \"properties\", \"type\": \"array\", \"uniqueItems\": true, \"required\": true, \"items\": { \"$ref\": \"Playlist.Property.Name\" } }"
1205 "\"returns\": { \"$ref\": \"Playlist.Property.Value\", \"required\": true }"
1207 "\"Playlist.GetItems\": {"
1208 "\"type\": \"method\","
1209 "\"description\": \"Get all items from playlist\","
1210 "\"transport\": \"Response\","
1211 "\"permission\": \"ReadData\","
1213 "{ \"name\": \"playlistid\", \"$ref\": \"Playlist.Id\", \"required\": true },"
1214 "{ \"name\": \"properties\", \"$ref\": \"List.Fields.All\" },"
1215 "{ \"name\": \"limits\", \"$ref\": \"List.Limits\" },"
1216 "{ \"name\": \"sort\", \"$ref\": \"List.Sort\" }"
1218 "\"returns\": { \"type\": \"object\","
1220 "\"limits\": { \"$ref\": \"List.LimitsReturned\", \"required\": true },"
1221 "\"items\": { \"type\": \"array\", \"items\": { \"$ref\": \"List.Item.All\" }, \"required\": true }"
1225 "\"Playlist.Add\": {"
1226 "\"type\": \"method\","
1227 "\"description\": \"Add item(s) to playlist\","
1228 "\"transport\": \"Response\","
1229 "\"permission\": \"ControlPlayback\","
1231 "{ \"name\": \"playlistid\", \"$ref\": \"Playlist.Id\", \"required\": true },"
1232 "{ \"name\": \"item\", \"$ref\": \"Playlist.Item\", \"required\": true }"
1234 "\"returns\": \"string\""
1236 "\"Playlist.Insert\": {"
1237 "\"type\": \"method\","
1238 "\"description\": \"Insert item(s) into playlist. Does not work for picture playlists (aka slideshows).\","
1239 "\"transport\": \"Response\","
1240 "\"permission\": \"ControlPlayback\","
1242 "{ \"name\": \"playlistid\", \"$ref\": \"Playlist.Id\", \"required\": true },"
1243 "{ \"name\": \"position\", \"$ref\": \"Playlist.Position\", \"required\": true },"
1244 "{ \"name\": \"item\", \"$ref\": \"Playlist.Item\", \"required\": true }"
1246 "\"returns\": \"string\""
1248 "\"Playlist.Remove\": {"
1249 "\"type\": \"method\","
1250 "\"description\": \"Remove item from playlist. Does not work for picture playlists (aka slideshows).\","
1251 "\"transport\": \"Response\","
1252 "\"permission\": \"ControlPlayback\","
1254 "{ \"name\": \"playlistid\", \"$ref\": \"Playlist.Id\", \"required\": true },"
1255 "{ \"name\": \"position\", \"$ref\": \"Playlist.Position\", \"required\": true }"
1257 "\"returns\": \"string\""
1259 "\"Playlist.Clear\": {"
1260 "\"type\": \"method\","
1261 "\"description\": \"Clear playlist\","
1262 "\"transport\": \"Response\","
1263 "\"permission\": \"ControlPlayback\","
1265 "{ \"name\": \"playlistid\", \"$ref\": \"Playlist.Id\", \"required\": true }"
1267 "\"returns\": \"string\""
1269 "\"Playlist.Swap\": {"
1270 "\"type\": \"method\","
1271 "\"description\": \"Swap items in the playlist. Does not work for picture playlists (aka slideshows).\","
1272 "\"transport\": \"Response\","
1273 "\"permission\": \"ControlPlayback\","
1275 "{ \"name\": \"playlistid\", \"$ref\": \"Playlist.Id\", \"required\": true },"
1276 "{ \"name\": \"position1\", \"$ref\": \"Playlist.Position\", \"required\": true },"
1277 "{ \"name\": \"position2\", \"$ref\": \"Playlist.Position\", \"required\": true }"
1279 "\"returns\": \"string\""
1281 "\"Files.GetSources\": {"
1282 "\"type\": \"method\","
1283 "\"description\": \"Get the sources of the media windows\","
1284 "\"transport\": \"Response\","
1285 "\"permission\": \"ReadData\","
1287 "{ \"name\": \"media\", \"$ref\": \"Files.Media\", \"required\": true },"
1288 "{ \"name\": \"limits\", \"$ref\": \"List.Limits\" },"
1289 "{ \"name\": \"sort\", \"$ref\": \"List.Sort\" }"
1292 "\"type\": \"object\","
1294 "\"limits\": { \"$ref\": \"List.LimitsReturned\", \"required\": true },"
1295 "\"sources\": { \"$ref\": \"List.Items.Sources\", \"required\": true }"
1299 "\"Files.Download\": {"
1300 "\"type\": \"method\","
1301 "\"description\": \"Provides a way to download a given file (e.g. providing an URL to the real file location)\","
1302 "\"transport\": [ \"Response\", \"FileDownload\" ],"
1303 "\"permission\": \"ReadData\","
1305 "{ \"name\": \"path\", \"type\": \"string\", \"required\": true }"
1308 "\"type\": \"object\","
1310 "\"path\": { \"type\": \"string\", \"required\": true }"
1314 "\"Files.GetDirectory\": {"
1315 "\"type\": \"method\","
1316 "\"description\": \"Get the directories and files in the given directory\","
1317 "\"transport\": \"Response\","
1318 "\"permission\": \"ReadData\","
1320 "{ \"name\": \"directory\", \"type\": \"string\", \"required\": true },"
1321 "{ \"name\": \"media\", \"$ref\": \"Files.Media\", \"default\": \"files\" },"
1322 "{ \"name\": \"properties\", \"$ref\": \"List.Fields.All\" },"
1323 "{ \"name\": \"sort\", \"$ref\": \"List.Sort\" }"
1326 "\"type\": \"object\","
1328 "\"limits\": { \"$ref\": \"List.LimitsReturned\", \"required\": true },"
1329 "\"files\": { \"type\": \"array\", \"items\": { \"$ref\": \"List.Item.File\" }, \"required\": true }"
1333 "\"AudioLibrary.GetArtists\": {"
1334 "\"type\": \"method\","
1335 "\"description\": \"Retrieve all artists\","
1336 "\"transport\": \"Response\","
1337 "\"permission\": \"ReadData\","
1339 "{ \"name\": \"albumartistsonly\", \"$ref\": \"Optional.Boolean\", \"description\": \"Whether or not to include artists only appearing in compilations. If the parameter is not passed or is passed as null the GUI setting will be used\" },"
1340 "{ \"name\": \"genreid\", \"$ref\": \"Library.Id\" },"
1341 "{ \"name\": \"properties\", \"$ref\": \"Audio.Fields.Artist\" },"
1342 "{ \"name\": \"limits\", \"$ref\": \"List.Limits\" },"
1343 "{ \"name\": \"sort\", \"$ref\": \"List.Sort\" }"
1346 "\"type\": \"object\","
1348 "\"limits\": { \"$ref\": \"List.LimitsReturned\", \"required\": true },"
1349 "\"artists\": { \"type\": \"array\","
1350 "\"items\": { \"$ref\": \"Audio.Details.Artist\" }"
1355 "\"AudioLibrary.GetArtistDetails\": {"
1356 "\"type\": \"method\","
1357 "\"description\": \"Retrieve details about a specific artist\","
1358 "\"transport\": \"Response\","
1359 "\"permission\": \"ReadData\","
1361 "{ \"name\": \"artistid\", \"$ref\": \"Library.Id\", \"required\": true },"
1362 "{ \"name\": \"properties\", \"$ref\": \"Audio.Fields.Artist\" }"
1364 "\"returns\": { \"type\": \"object\","
1366 "\"artistdetails\": { \"$ref\": \"Audio.Details.Artist\" }"
1370 "\"AudioLibrary.GetAlbums\": {"
1371 "\"type\": \"method\","
1372 "\"description\": \"Retrieve all albums from specified artist or genre\","
1373 "\"transport\": \"Response\","
1374 "\"permission\": \"ReadData\","
1376 "{ \"name\": \"artistid\", \"$ref\": \"Library.Id\" },"
1377 "{ \"name\": \"genreid\", \"$ref\": \"Library.Id\" },"
1378 "{ \"name\": \"properties\", \"$ref\": \"Audio.Fields.Album\" },"
1379 "{ \"name\": \"limits\", \"$ref\": \"List.Limits\" },"
1380 "{ \"name\": \"sort\", \"$ref\": \"List.Sort\" }"
1383 "\"type\": \"object\","
1385 "\"limits\": { \"$ref\": \"List.LimitsReturned\", \"required\": true },"
1386 "\"albums\": { \"type\": \"array\","
1387 "\"items\": { \"$ref\": \"Audio.Details.Album\" }"
1392 "\"AudioLibrary.GetAlbumDetails\": {"
1393 "\"type\": \"method\","
1394 "\"description\": \"Retrieve details about a specific album\","
1395 "\"transport\": \"Response\","
1396 "\"permission\": \"ReadData\","
1398 "{ \"name\": \"albumid\", \"$ref\": \"Library.Id\", \"required\": true },"
1399 "{ \"name\": \"properties\", \"$ref\": \"Audio.Fields.Album\" }"
1401 "\"returns\": { \"type\": \"object\","
1403 "\"albumdetails\": { \"$ref\": \"Audio.Details.Album\" }"
1407 "\"AudioLibrary.GetSongs\": {"
1408 "\"type\": \"method\","
1409 "\"description\": \"Retrieve all songs from specified album, artist or genre\","
1410 "\"transport\": \"Response\","
1411 "\"permission\": \"ReadData\","
1413 "{ \"name\": \"artistid\", \"$ref\": \"Library.Id\" },"
1414 "{ \"name\": \"albumid\", \"$ref\": \"Library.Id\" },"
1415 "{ \"name\": \"genreid\", \"$ref\": \"Library.Id\" },"
1416 "{ \"name\": \"properties\", \"$ref\": \"Audio.Fields.Song\" },"
1417 "{ \"name\": \"limits\", \"$ref\": \"List.Limits\" },"
1418 "{ \"name\": \"sort\", \"$ref\": \"List.Sort\" }"
1421 "\"type\": \"object\","
1423 "\"limits\": { \"$ref\": \"List.LimitsReturned\", \"required\": true },"
1424 "\"songs\": { \"type\": \"array\","
1425 "\"items\": { \"$ref\": \"Audio.Details.Song\" }"
1430 "\"AudioLibrary.GetSongDetails\": {"
1431 "\"type\": \"method\","
1432 "\"description\": \"Retrieve details about a specific song\","
1433 "\"transport\": \"Response\","
1434 "\"permission\": \"ReadData\","
1436 "{ \"name\": \"songid\", \"$ref\": \"Library.Id\", \"required\": true },"
1437 "{ \"name\": \"properties\", \"$ref\": \"Audio.Fields.Song\" }"
1439 "\"returns\": { \"type\": \"object\","
1441 "\"songdetails\": { \"$ref\": \"Audio.Details.Song\" }"
1445 "\"AudioLibrary.GetRecentlyAddedAlbums\": {"
1446 "\"type\": \"method\","
1447 "\"description\": \"Retrieve recently added albums\","
1448 "\"transport\": \"Response\","
1449 "\"permission\": \"ReadData\","
1451 "{ \"name\": \"properties\", \"$ref\": \"Audio.Fields.Album\" },"
1452 "{ \"name\": \"limits\", \"$ref\": \"List.Limits\" },"
1453 "{ \"name\": \"sort\", \"$ref\": \"List.Sort\" }"
1456 "\"type\": \"object\","
1458 "\"limits\": { \"$ref\": \"List.LimitsReturned\", \"required\": true },"
1459 "\"albums\": { \"type\": \"array\","
1460 "\"items\": { \"$ref\": \"Audio.Details.Album\" }"
1465 "\"AudioLibrary.GetRecentlyAddedSongs\": {"
1466 "\"type\": \"method\","
1467 "\"description\": \"Retrieve recently added songs\","
1468 "\"transport\": \"Response\","
1469 "\"permission\": \"ReadData\","
1471 "{ \"name\": \"albumlimit\", \"$ref\": \"List.Amount\", \"description\": \"The amount of recently added albums from which to return the songs\" },"
1472 "{ \"name\": \"properties\", \"$ref\": \"Audio.Fields.Song\" },"
1473 "{ \"name\": \"limits\", \"$ref\": \"List.Limits\" },"
1474 "{ \"name\": \"sort\", \"$ref\": \"List.Sort\" }"
1477 "\"type\": \"object\","
1479 "\"limits\": { \"$ref\": \"List.LimitsReturned\", \"required\": true },"
1480 "\"songs\": { \"type\": \"array\","
1481 "\"items\": { \"$ref\": \"Audio.Details.Song\" }"
1486 "\"AudioLibrary.GetGenres\": {"
1487 "\"type\": \"method\","
1488 "\"description\": \"Retrieve all genres\","
1489 "\"transport\": \"Response\","
1490 "\"permission\": \"ReadData\","
1492 "{ \"name\": \"properties\", \"$ref\": \"Library.Fields.Genre\" },"
1493 "{ \"name\": \"limits\", \"$ref\": \"List.Limits\" },"
1494 "{ \"name\": \"sort\", \"$ref\": \"List.Sort\" }"
1497 "\"type\": \"object\","
1499 "\"limits\": { \"$ref\": \"List.LimitsReturned\", \"required\": true },"
1500 "\"genres\": { \"type\": \"array\", \"required\": true,"
1501 "\"items\": { \"$ref\": \"Library.Details.Genre\" }"
1506 "\"AudioLibrary.Scan\": {"
1507 "\"type\": \"method\","
1508 "\"description\": \"Scans the audio sources for new library items\","
1509 "\"transport\": \"Response\","
1510 "\"permission\": \"UpdateData\","
1512 "\"returns\": \"string\""
1514 "\"AudioLibrary.Export\": {"
1515 "\"type\": \"method\","
1516 "\"description\": \"Exports all items from the audio library\","
1517 "\"transport\": \"Response\","
1518 "\"permission\": \"WriteFile\","
1520 "{ \"name\": \"options\", \"type\": ["
1521 "{ \"type\": \"object\", \"required\": true, \"additionalProperties\": false,"
1523 "\"path\": { \"type\": \"string\", \"required\": true, \"minLength\": 1, \"description\": \"Path to the directory to where the data should be exported\" }"
1526 "{ \"type\": \"object\", \"required\": true, \"additionalProperties\": false,"
1528 "\"overwrite\": { \"type\": \"boolean\", \"default\": false, \"description\": \"Whether to overwrite existing exported files\" },"
1529 "\"images\": { \"type\": \"boolean\", \"default\": false, \"description\": \"Whether to export thumbnails and fanart images\" }"
1535 "\"returns\": \"string\""
1537 "\"AudioLibrary.Clean\": {"
1538 "\"type\": \"method\","
1539 "\"description\": \"Cleans the audio library from non-existent items\","
1540 "\"transport\": \"Response\","
1541 "\"permission\": \"RemoveData\","
1543 "\"returns\": \"string\""
1545 "\"VideoLibrary.GetMovies\": {"
1546 "\"type\": \"method\","
1547 "\"description\": \"Retrieve all movies\","
1548 "\"transport\": \"Response\","
1549 "\"permission\": \"ReadData\","
1551 "{ \"name\": \"properties\", \"$ref\": \"Video.Fields.Movie\" },"
1552 "{ \"name\": \"limits\", \"$ref\": \"List.Limits\" },"
1553 "{ \"name\": \"sort\", \"$ref\": \"List.Sort\" }"
1556 "\"type\": \"object\","
1558 "\"limits\": { \"$ref\": \"List.LimitsReturned\", \"required\": true },"
1559 "\"movies\": { \"type\": \"array\","
1560 "\"items\": { \"$ref\": \"Video.Details.Movie\" }"
1565 "\"VideoLibrary.GetMovieDetails\": {"
1566 "\"type\": \"method\","
1567 "\"description\": \"Retrieve details about a specific movie\","
1568 "\"transport\": \"Response\","
1569 "\"permission\": \"ReadData\","
1571 "{ \"name\": \"movieid\", \"$ref\": \"Library.Id\", \"required\": true },"
1572 "{ \"name\": \"properties\", \"$ref\": \"Video.Fields.Movie\" }"
1574 "\"returns\": { \"type\": \"object\","
1576 "\"moviedetails\": { \"$ref\": \"Video.Details.Movie\" }"
1580 "\"VideoLibrary.GetMovieSets\": {"
1581 "\"type\": \"method\","
1582 "\"description\": \"Retrieve all movie sets\","
1583 "\"transport\": \"Response\","
1584 "\"permission\": \"ReadData\","
1586 "{ \"name\": \"properties\", \"$ref\": \"Video.Fields.MovieSet\" },"
1587 "{ \"name\": \"limits\", \"$ref\": \"List.Limits\" },"
1588 "{ \"name\": \"sort\", \"$ref\": \"List.Sort\" }"
1590 "\"returns\": { \"type\": \"object\","
1592 "\"limits\": { \"$ref\": \"List.LimitsReturned\", \"required\": true },"
1593 "\"sets\": { \"type\": \"array\","
1594 "\"items\": { \"$ref\": \"Video.Details.MovieSet\" }"
1599 "\"VideoLibrary.GetMovieSetDetails\": {"
1600 "\"type\": \"method\","
1601 "\"description\": \"Retrieve details about a specific movie set\","
1602 "\"transport\": \"Response\","
1603 "\"permission\": \"ReadData\","
1605 "{ \"name\": \"setid\", \"$ref\": \"Library.Id\", \"required\": true },"
1606 "{ \"name\": \"properties\", \"$ref\": \"Video.Fields.MovieSet\" },"
1607 "{ \"name\": \"movies\", \"type\": \"object\","
1609 "\"properties\": { \"$ref\": \"Video.Fields.Movie\" },"
1610 "\"limits\": { \"$ref\": \"List.Limits\" },"
1611 "\"sort\": { \"$ref\": \"List.Sort\" }"
1615 "\"returns\": { \"type\": \"object\","
1617 "\"setdetails\": { \"$ref\": \"Video.Details.MovieSet.Extended\" }"
1621 "\"VideoLibrary.GetTVShows\": {"
1622 "\"type\": \"method\","
1623 "\"description\": \"Retrieve all tv shows\","
1624 "\"transport\": \"Response\","
1625 "\"permission\": \"ReadData\","
1627 "{ \"name\": \"properties\", \"$ref\": \"Video.Fields.TVShow\" },"
1628 "{ \"name\": \"limits\", \"$ref\": \"List.Limits\" },"
1629 "{ \"name\": \"sort\", \"$ref\": \"List.Sort\" }"
1631 "\"returns\": { \"type\": \"object\","
1633 "\"limits\": { \"$ref\": \"List.LimitsReturned\", \"required\": true },"
1634 "\"tvshows\": { \"type\": \"array\","
1635 "\"items\": { \"$ref\": \"Video.Details.TVShow\" }"
1640 "\"VideoLibrary.GetTVShowDetails\": {"
1641 "\"type\": \"method\","
1642 "\"description\": \"Retrieve details about a specific tv show\","
1643 "\"transport\": \"Response\","
1644 "\"permission\": \"ReadData\","
1646 "{ \"name\": \"tvshowid\", \"$ref\": \"Library.Id\", \"required\": true },"
1647 "{ \"name\": \"properties\", \"$ref\": \"Video.Fields.TVShow\" }"
1649 "\"returns\": { \"type\": \"object\","
1651 "\"tvshowdetails\": { \"$ref\": \"Video.Details.TVShow\" }"
1655 "\"VideoLibrary.GetSeasons\": {"
1656 "\"type\": \"method\","
1657 "\"description\": \"Retrieve all tv seasons\","
1658 "\"transport\": \"Response\","
1659 "\"permission\": \"ReadData\","
1661 "{ \"name\": \"tvshowid\", \"$ref\": \"Library.Id\", \"required\": true },"
1662 "{ \"name\": \"properties\", \"$ref\": \"Video.Fields.Season\" },"
1663 "{ \"name\": \"limits\", \"$ref\": \"List.Limits\" },"
1664 "{ \"name\": \"sort\", \"$ref\": \"List.Sort\" }"
1666 "\"returns\": { \"type\": \"object\","
1668 "\"limits\": { \"$ref\": \"List.LimitsReturned\", \"required\": true },"
1669 "\"seasons\": { \"type\": \"array\","
1670 "\"items\": { \"$ref\": \"Video.Details.Season\" }"
1675 "\"VideoLibrary.GetEpisodes\": {"
1676 "\"type\": \"method\","
1677 "\"description\": \"Retrieve all tv show episodes\","
1678 "\"transport\": \"Response\","
1679 "\"permission\": \"ReadData\","
1681 "{ \"name\": \"tvshowid\", \"$ref\": \"Library.Id\" },"
1682 "{ \"name\": \"season\", \"type\": \"integer\", \"minimum\": 0, \"default\": -1 },"
1683 "{ \"name\": \"properties\", \"$ref\": \"Video.Fields.Episode\" },"
1684 "{ \"name\": \"limits\", \"$ref\": \"List.Limits\" },"
1685 "{ \"name\": \"sort\", \"$ref\": \"List.Sort\" }"
1687 "\"returns\": { \"type\": \"object\","
1689 "\"limits\": { \"$ref\": \"List.LimitsReturned\", \"required\": true },"
1690 "\"episodes\": { \"type\": \"array\","
1691 "\"items\": { \"$ref\": \"Video.Details.Episode\" }"
1696 "\"VideoLibrary.GetEpisodeDetails\": {"
1697 "\"type\": \"method\","
1698 "\"description\": \"Retrieve details about a specific tv show episode\","
1699 "\"transport\": \"Response\","
1700 "\"permission\": \"ReadData\","
1702 "{ \"name\": \"episodeid\", \"$ref\": \"Library.Id\", \"required\": true },"
1703 "{ \"name\": \"properties\", \"$ref\": \"Video.Fields.Episode\" }"
1705 "\"returns\": { \"type\": \"object\","
1707 "\"episodedetails\": { \"$ref\": \"Video.Details.Episode\" }"
1711 "\"VideoLibrary.GetMusicVideos\": {"
1712 "\"type\": \"method\","
1713 "\"description\": \"Retrieve all music videos\","
1714 "\"transport\": \"Response\","
1715 "\"permission\": \"ReadData\","
1717 "{ \"name\": \"artistid\", \"$ref\": \"Library.Id\" },"
1718 "{ \"name\": \"albumid\", \"$ref\": \"Library.Id\" },"
1719 "{ \"name\": \"properties\", \"$ref\": \"Video.Fields.MusicVideo\" },"
1720 "{ \"name\": \"limits\", \"$ref\": \"List.Limits\" },"
1721 "{ \"name\": \"sort\", \"$ref\": \"List.Sort\" }"
1723 "\"returns\": { \"type\": \"object\","
1725 "\"limits\": { \"$ref\": \"List.LimitsReturned\", \"required\": true },"
1726 "\"musicvideos\": { \"type\": \"array\","
1727 "\"items\": { \"$ref\": \"Video.Details.MusicVideo\" }"
1732 "\"VideoLibrary.GetMusicVideoDetails\": {"
1733 "\"type\": \"method\","
1734 "\"description\": \"Retrieve details about a specific music video\","
1735 "\"transport\": \"Response\","
1736 "\"permission\": \"ReadData\","
1738 "{ \"name\": \"musicvideoid\", \"$ref\": \"Library.Id\", \"required\": true },"
1739 "{ \"name\": \"properties\", \"$ref\": \"Video.Fields.MusicVideo\" }"
1741 "\"returns\": { \"type\": \"object\","
1743 "\"musicvideodetails\": { \"$ref\": \"Video.Details.MusicVideo\" }"
1747 "\"VideoLibrary.GetRecentlyAddedMovies\": {"
1748 "\"type\": \"method\","
1749 "\"description\": \"Retrieve all recently added movies\","
1750 "\"transport\": \"Response\","
1751 "\"permission\": \"ReadData\","
1753 "{ \"name\": \"properties\", \"$ref\": \"Video.Fields.Movie\" },"
1754 "{ \"name\": \"limits\", \"$ref\": \"List.Limits\" },"
1755 "{ \"name\": \"sort\", \"$ref\": \"List.Sort\" }"
1757 "\"returns\": { \"type\": \"object\","
1759 "\"limits\": { \"$ref\": \"List.LimitsReturned\", \"required\": true },"
1760 "\"movies\": { \"type\": \"array\","
1761 "\"items\": { \"$ref\": \"Video.Details.Movie\" }"
1766 "\"VideoLibrary.GetRecentlyAddedEpisodes\": {"
1767 "\"type\": \"method\","
1768 "\"description\": \"Retrieve all recently added tv episodes\","
1769 "\"transport\": \"Response\","
1770 "\"permission\": \"ReadData\","
1772 "{ \"name\": \"properties\", \"$ref\": \"Video.Fields.Episode\" },"
1773 "{ \"name\": \"limits\", \"$ref\": \"List.Limits\" },"
1774 "{ \"name\": \"sort\", \"$ref\": \"List.Sort\" }"
1776 "\"returns\": { \"type\": \"object\","
1778 "\"limits\": { \"$ref\": \"List.LimitsReturned\", \"required\": true },"
1779 "\"episodes\": { \"type\": \"array\","
1780 "\"items\": { \"$ref\": \"Video.Details.Episode\" }"
1785 "\"VideoLibrary.GetRecentlyAddedMusicVideos\": {"
1786 "\"type\": \"method\","
1787 "\"description\": \"Retrieve all recently added music videos\","
1788 "\"transport\": \"Response\","
1789 "\"permission\": \"ReadData\","
1791 "{ \"name\": \"properties\", \"$ref\": \"Video.Fields.MusicVideo\" },"
1792 "{ \"name\": \"limits\", \"$ref\": \"List.Limits\" },"
1793 "{ \"name\": \"sort\", \"$ref\": \"List.Sort\" }"
1795 "\"returns\": { \"type\": \"object\","
1797 "\"limits\": { \"$ref\": \"List.LimitsReturned\", \"required\": true },"
1798 "\"musicvideos\": { \"type\": \"array\","
1799 "\"items\": { \"$ref\": \"Video.Details.MusicVideo\" }"
1804 "\"VideoLibrary.GetGenres\": {"
1805 "\"type\": \"method\","
1806 "\"description\": \"Retrieve all genres\","
1807 "\"transport\": \"Response\","
1808 "\"permission\": \"ReadData\","
1810 "{ \"name\": \"type\", \"type\": \"string\", \"required\": true, \"enum\": [ \"movie\", \"tvshow\", \"musicvideo\"] },"
1811 "{ \"name\": \"properties\", \"$ref\": \"Library.Fields.Genre\" },"
1812 "{ \"name\": \"limits\", \"$ref\": \"List.Limits\" },"
1813 "{ \"name\": \"sort\", \"$ref\": \"List.Sort\" }"
1816 "\"type\": \"object\","
1818 "\"limits\": { \"$ref\": \"List.LimitsReturned\", \"required\": true },"
1819 "\"genres\": { \"type\": \"array\", \"required\": true,"
1820 "\"items\": { \"$ref\": \"Library.Details.Genre\" }"
1825 "\"VideoLibrary.Scan\": {"
1826 "\"type\": \"method\","
1827 "\"description\": \"Scans the video sources for new library items\","
1828 "\"transport\": \"Response\","
1829 "\"permission\": \"UpdateData\","
1831 "\"returns\": \"string\""
1833 "\"VideoLibrary.Export\": {"
1834 "\"type\": \"method\","
1835 "\"description\": \"Exports all items from the video library\","
1836 "\"transport\": \"Response\","
1837 "\"permission\": \"WriteFile\","
1839 "{ \"name\": \"options\", \"type\": ["
1840 "{ \"type\": \"object\", \"required\": true, \"additionalProperties\": false,"
1842 "\"path\": { \"type\": \"string\", \"required\": true, \"minLength\": 1, \"description\": \"Path to the directory to where the data should be exported\" }"
1845 "{ \"type\": \"object\", \"required\": true, \"additionalProperties\": false,"
1847 "\"overwrite\": { \"type\": \"boolean\", \"default\": false, \"description\": \"Whether to overwrite existing exported files\" },"
1848 "\"images\": { \"type\": \"boolean\", \"default\": false, \"description\": \"Whether to export thumbnails and fanart images\" },"
1849 "\"actorthumbs\": { \"type\": \"boolean\", \"default\": false, \"description\": \"Whether to export actor thumbnails\" }"
1855 "\"returns\": \"string\""
1857 "\"VideoLibrary.Clean\": {"
1858 "\"type\": \"method\","
1859 "\"description\": \"Cleans the video library from non-existent items\","
1860 "\"transport\": \"Response\","
1861 "\"permission\": \"RemoveData\","
1863 "\"returns\": \"string\""
1865 "\"System.GetProperties\": {"
1866 "\"type\": \"method\","
1867 "\"description\": \"Retrieves the values of the given properties\","
1868 "\"transport\": \"Response\","
1869 "\"permission\": \"ReadData\","
1871 "{ \"name\": \"properties\", \"type\": \"array\", \"uniqueItems\": true, \"required\": true, \"items\": { \"$ref\": \"System.Property.Name\" } }"
1873 "\"returns\": { \"$ref\": \"System.Property.Value\", \"required\": true }"
1875 "\"System.Shutdown\": {"
1876 "\"type\": \"method\","
1877 "\"description\": \"Shuts the system running XBMC down\","
1878 "\"transport\": \"Response\","
1879 "\"permission\": \"ControlPower\","
1881 "\"returns\": \"string\""
1883 "\"System.Suspend\": {"
1884 "\"type\": \"method\","
1885 "\"description\": \"Suspends the system running XBMC\","
1886 "\"transport\": \"Response\","
1887 "\"permission\": \"ControlPower\","
1889 "\"returns\": \"string\""
1891 "\"System.Hibernate\": {"
1892 "\"type\": \"method\","
1893 "\"description\": \"Puts the system running XBMC into hibernate mode\","
1894 "\"transport\": \"Response\","
1895 "\"permission\": \"ControlPower\","
1897 "\"returns\": \"string\""
1899 "\"System.Reboot\": {"
1900 "\"type\": \"method\","
1901 "\"description\": \"Reboots the system running XBMC\","
1902 "\"transport\": \"Response\","
1903 "\"permission\": \"ControlPower\","
1905 "\"returns\": \"string\""
1908 "\"type\": \"method\","
1909 "\"description\": \"Navigate left in GUI\","
1910 "\"transport\": \"Response\","
1911 "\"permission\": \"Navigate\","
1913 "\"returns\": \"string\""
1915 "\"Input.Right\": {"
1916 "\"type\": \"method\","
1917 "\"description\": \"Navigate right in GUI\","
1918 "\"transport\": \"Response\","
1919 "\"permission\": \"Navigate\","
1921 "\"returns\": \"string\""
1924 "\"type\": \"method\","
1925 "\"description\": \"Navigate down in GUI\","
1926 "\"transport\": \"Response\","
1927 "\"permission\": \"Navigate\","
1929 "\"returns\": \"string\""
1932 "\"type\": \"method\","
1933 "\"description\": \"Navigate up in GUI\","
1934 "\"transport\": \"Response\","
1935 "\"permission\": \"Navigate\","
1937 "\"returns\": \"string\""
1939 "\"Input.Select\": {"
1940 "\"type\": \"method\","
1941 "\"description\": \"Select current item in GUI\","
1942 "\"transport\": \"Response\","
1943 "\"permission\": \"Navigate\","
1945 "\"returns\": \"string\""
1948 "\"type\": \"method\","
1949 "\"description\": \"Goes back in GUI\","
1950 "\"transport\": \"Response\","
1951 "\"permission\": \"Navigate\","
1953 "\"returns\": \"string\""
1956 "\"type\": \"method\","
1957 "\"description\": \"Goes to home window in GUI\","
1958 "\"transport\": \"Response\","
1959 "\"permission\": \"Navigate\","
1961 "\"returns\": \"string\""
1963 "\"Application.GetProperties\": {"
1964 "\"type\": \"method\","
1965 "\"description\": \"Retrieves the values of the given properties\","
1966 "\"transport\": \"Response\","
1967 "\"permission\": \"ReadData\","
1969 "{ \"name\": \"properties\", \"type\": \"array\", \"uniqueItems\": true, \"required\": true, \"items\": { \"$ref\": \"Application.Property.Name\" } }"
1971 "\"returns\": { \"$ref\": \"Application.Property.Value\", \"required\": true }"
1973 "\"Application.SetVolume\": {"
1974 "\"type\": \"method\","
1975 "\"description\": \"Set the current volume\","
1976 "\"transport\": \"Response\","
1977 "\"permission\": \"ControlPlayback\","
1979 "{ \"name\": \"volume\", \"type\": \"integer\", \"minimum\": 0, \"maximum\": 100, \"required\": true }"
1981 "\"returns\": \"integer\""
1983 "\"Application.SetMute\": {"
1984 "\"type\": \"method\","
1985 "\"description\": \"Toggle mute/unmute\","
1986 "\"transport\": \"Response\","
1987 "\"permission\": \"ControlPlayback\","
1989 "{ \"name\": \"mute\", \"required\": true, \"type\": ["
1990 "{ \"type\": \"boolean\", \"required\": true },"
1991 "{ \"type\": \"string\", \"enum\": [ \"toggle\" ], \"required\": true }"
1995 "\"returns\": { \"type\": \"boolean\", \"description\": \"Mute state\" }"
1997 "\"Application.Quit\": {"
1998 "\"type\": \"method\","
1999 "\"description\": \"Quit application\","
2000 "\"transport\": \"Response\","
2001 "\"permission\": \"ControlPower\","
2003 "\"returns\": \"string\""
2005 "\"XBMC.GetInfoLabels\": {"
2006 "\"type\": \"method\","
2007 "\"description\": \"Retrieve info labels about XBMC and the system\","
2008 "\"transport\": \"Response\","
2009 "\"permission\": \"ReadData\","
2011 "{ \"name\": \"labels\", \"type\": \"array\", \"required\": true, \"items\": { \"type\": \"string\" }, \"minItems\": 1, \"description\": \"See http://wiki.xbmc.org/index.php?title=InfoLabels for a list of possible info labels\" }"
2014 "\"type\": \"object\","
2015 "\"description\": \"List of key-value pairs of the retrieved info labels\""
2018 "\"XBMC.GetInfoBooleans\": {"
2019 "\"type\": \"method\","
2020 "\"description\": \"Retrieve info booleans about XBMC and the system\","
2021 "\"transport\": \"Response\","
2022 "\"permission\": \"ReadData\","
2024 "{ \"name\": \"booleans\", \"type\": \"array\", \"required\": true, \"items\": { \"type\": \"string\" }, \"minItems\": 1 }"
2027 "\"type\": \"object\","
2028 "\"description\": \"List of key-value pairs of the retrieved info booleans\""
2033 const char* const JSONRPC_SERVICE_NOTIFICATIONS[] = {
2034 "\"Player.OnPlay\": {"
2035 "\"type\": \"notification\","
2036 "\"description\": \"Playback of a media item has been started or the playback speed has changed. If there is no ID available extra information will be provided.\","
2038 "{ \"name\": \"sender\", \"type\": \"string\", \"required\": true },"
2039 "{ \"name\": \"data\", \"$ref\": \"Player.Notifications.Data\", \"required\": true }"
2043 "\"Player.OnPause\": {"
2044 "\"type\": \"notification\","
2045 "\"description\": \"Playback of a media item has been paused. If there is no ID available extra information will be provided.\","
2047 "{ \"name\": \"sender\", \"type\": \"string\", \"required\": true },"
2048 "{ \"name\": \"data\", \"$ref\": \"Player.Notifications.Data\", \"required\": true }"
2052 "\"Player.OnStop\": {"
2053 "\"type\": \"notification\","
2054 "\"description\": \"Playback of a media item has been stopped. If there is no ID available extra information will be provided.\","
2056 "{ \"name\": \"sender\", \"type\": \"string\", \"required\": true },"
2057 "{ \"name\": \"data\", \"type\": \"object\", \"required\": true, "
2059 "\"item\": { \"$ref\": \"Player.Notifications.Item\" }"
2065 "\"Player.OnSpeedChanged\": {"
2066 "\"type\": \"notification\","
2067 "\"description\": \"Speed of the playback of a media item has been changed. If there is no ID available extra information will be provided.\","
2069 "{ \"name\": \"sender\", \"type\": \"string\", \"required\": true },"
2070 "{ \"name\": \"data\", \"$ref\": \"Player.Notifications.Data\", \"required\": true }"
2074 "\"Player.OnSeek\": {"
2075 "\"type\": \"notification\","
2076 "\"description\": \"The playback position has been changed. If there is no ID available extra information will be provided.\","
2078 "{ \"name\": \"sender\", \"type\": \"string\", \"required\": true },"
2079 "{ \"name\": \"data\", \"type\": \"object\", \"required\": true, "
2081 "\"item\": { \"$ref\": \"Player.Notifications.Item\" },"
2082 "\"player\": { \"$ref\": \"Player.Notifications.Player.Seek\", \"required\": true }"
2088 "\"AudioLibrary.OnUpdate\": {"
2089 "\"type\": \"notification\","
2090 "\"description\": \"An audio item has been updated.\","
2092 "{ \"name\": \"sender\", \"type\": \"string\", \"required\": true },"
2093 "{ \"name\": \"data\", \"type\": \"object\", \"required\": true,"
2095 "\"id\": { \"$ref\": \"Library.Id\", \"required\": true },"
2096 "\"type\": { \"type\": \"string\", \"id\": \"Notifications.Library.Audio.Type\", \"enum\": [ \"song\" ], \"required\": true }"
2102 "\"AudioLibrary.OnRemove\": {"
2103 "\"type\": \"notification\","
2104 "\"description\": \"An audio item has been removed.\","
2106 "{ \"name\": \"sender\", \"type\": \"string\", \"required\": true },"
2107 "{ \"name\": \"data\", \"type\": \"object\", \"required\": true,"
2109 "\"id\": { \"$ref\": \"Library.Id\", \"required\": true },"
2110 "\"type\": { \"$ref\": \"Notifications.Library.Audio.Type\", \"required\": true }"
2116 "\"VideoLibrary.OnUpdate\": {"
2117 "\"type\": \"notification\","
2118 "\"description\": \"A video item has been updated.\","
2120 "{ \"name\": \"sender\", \"type\": \"string\", \"required\": true },"
2121 "{ \"name\": \"data\", \"type\": \"object\", \"required\": true,"
2123 "\"id\": { \"$ref\": \"Library.Id\", \"required\": true },"
2124 "\"type\": { \"type\": \"string\", \"id\": \"Notifications.Library.Video.Type\", \"enum\": [ \"movie\", \"tvshow\", \"episode\", \"musicvideo\" ], \"required\": true },"
2125 "\"playcount\": { \"type\": \"integer\", \"minimum\": 0, \"default\": -1 }"
2131 "\"VideoLibrary.OnRemove\": {"
2132 "\"type\": \"notification\","
2133 "\"description\": \"A video item has been removed.\","
2135 "{ \"name\": \"sender\", \"type\": \"string\", \"required\": true },"
2136 "{ \"name\": \"data\", \"type\": \"object\", \"required\": true,"
2138 "\"id\": { \"$ref\": \"Library.Id\", \"required\": true },"
2139 "\"type\": { \"$ref\": \"Notifications.Library.Video.Type\", \"required\": true }"
2145 "\"System.OnQuit\": {"
2146 "\"type\": \"notification\","
2147 "\"description\": \"XBMC will be closed.\","
2149 "{ \"name\": \"sender\", \"type\": \"string\", \"required\": true },"
2150 "{ \"name\": \"data\", \"type\": \"null\", \"required\": true }"
2154 "\"System.OnRestart\": {"
2155 "\"type\": \"notification\","
2156 "\"description\": \"The system will be restarted.\","
2158 "{ \"name\": \"sender\", \"type\": \"string\", \"required\": true },"
2159 "{ \"name\": \"data\", \"type\": \"null\", \"required\": true }"
2163 "\"System.OnSleep\": {"
2164 "\"type\": \"notification\","
2165 "\"description\": \"The system will be suspended.\","
2167 "{ \"name\": \"sender\", \"type\": \"string\", \"required\": true },"
2168 "{ \"name\": \"data\", \"type\": \"null\", \"required\": true }"
2172 "\"System.OnWake\": {"
2173 "\"type\": \"notification\","
2174 "\"description\": \"The system woke up from suspension.\","
2176 "{ \"name\": \"sender\", \"type\": \"string\", \"required\": true },"
2177 "{ \"name\": \"data\", \"type\": \"null\", \"required\": true }"
2181 "\"System.OnLowBattery\": {"
2182 "\"type\": \"notification\","
2183 "\"description\": \"The system is on low battery.\","
2185 "{ \"name\": \"sender\", \"type\": \"string\", \"required\": true },"
2186 "{ \"name\": \"data\", \"type\": \"null\", \"required\": true }"