Archive:JSON-RPC API/v4: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
m (web link corrections for xbmc -> kodi)
mNo edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{mininav|[[Development]]|[[JSON-RPC API]]}}
Version 4 is a stable version of XBMC's JSON-RPC API and is published with the release of Eden. It is a complete re-write and re-structuring of version 2 and therefore isn't backwards compatible to it. The main reason for this was the need to make this version fully compatible with all the functionality, features and requirements of the [http://jsonrpc.org/spec.html JSON-RPC 2.0 specification]. This was a main concern during early development to make it easier for third party developers and applications to interact with XBMC's JSON-RPC API by using existing JSON-RPC libraries.


Version 4 is a stable version of XBMC's JSON-RPC API and is published with the release of Eden. It is a complete re-write and re-structuring of [[JSON-RPC API/v2|version 2]] and therefore isn't backwards compatible to it. The main reason for this was the need to make this version fully compatible with all the functionality, features and requirements of the [http://jsonrpc.org/spec.html JSON-RPC 2.0 specification]. This was a main concern during early development to make it easier for third party developers and applications to interact with XBMC's JSON-RPC API by using existing JSON-RPC libraries.
An rough and incomplete list of changes compared to version 2 can be found [[Archive:Eden_API_changes|here]]. A more complete and detailed list can be found in the [http://forum.kodi.tv/showthread.php?t=98551 forum].
 
An rough and incomplete list of changes compared to version 2 can be found [[Eden API Changes|here]]. A more complete and detailed list can be found in the [http://forum.kodi.tv/showthread.php?t=98551 forum].


{{TOC right}}
{{TOC right}}
Line 27: Line 25:


== Documentation (JSON Schema) ==
== Documentation (JSON Schema) ==
Starting with JSON-RPC API version 3 a new way of API documentation has been introduced. All methods and data types are described using [http://tools.ietf.org/html/draft-zyp-json-schema-03 JSON Schema]. This provides third party developers with an always complete and up-to-date documentation by calling [[#JSONRPC.Introspect|JSONRPC.Introspect]] even during periods of heavy development. Furthermore the same method and data type specification that can be used by third party developers as a documentation is used by XBMC to check and verify method parameters and their values on every JSON-RPC request and allows to provide detailed error messages in case of a bad or missing parameter.
Starting with JSON-RPC API version 3 a new way of API documentation has been introduced. All methods and data types are described using [http://tools.ietf.org/html/draft-zyp-json-schema-03 JSON Schema]. This provides third party developers with an always complete and up-to-date documentation by calling JSONRPC.Introspect even during periods of heavy development. Furthermore the same method and data type specification that can be used by third party developers as a documentation is used by XBMC to check and verify method parameters and their values on every JSON-RPC request and allows to provide detailed error messages in case of a bad or missing parameter.


=== Supported features of JSON Schema ===
=== Supported features of JSON Schema ===
Line 152: Line 150:
{|
{|
|
|
<syntaxhighlight lang="javascript" enclose="div">
<syntaxhighlight lang=json enclose="div">
{
{
   "type": "object",
   "type": "object",
Line 6,393: Line 6,391:
}</syntaxhighlight>}}
}</syntaxhighlight>}}


== See also ==
* [[JSON-RPC API]]
* [[JSON-RPC API/v2|JSON-RPC API v2 (Dharma)]]
* [[JSON-RPC API/v6|JSON-RPC API v6 (Frodo)]]


== External links ==
== External links ==
Line 6,402: Line 6,396:
* [http://tools.ietf.org/html/draft-zyp-json-schema-03 A JSON Media Type for Describing the Structure and Meaning of JSON Documents (Draft 03)]
* [http://tools.ietf.org/html/draft-zyp-json-schema-03 A JSON Media Type for Describing the Structure and Meaning of JSON Documents (Draft 03)]


[[Category:Development]]
[[Category:JSON-RPC]]

Latest revision as of 23:33, 27 August 2020

Version 4 is a stable version of XBMC's JSON-RPC API and is published with the release of Eden. It is a complete re-write and re-structuring of version 2 and therefore isn't backwards compatible to it. The main reason for this was the need to make this version fully compatible with all the functionality, features and requirements of the JSON-RPC 2.0 specification. This was a main concern during early development to make it easier for third party developers and applications to interact with XBMC's JSON-RPC API by using existing JSON-RPC libraries.

An rough and incomplete list of changes compared to version 2 can be found here. A more complete and detailed list can be found in the forum.

JSON-RPC 2.0 compatibility

Version Method calls Notifications
(server-side)
Notifications
(client-side)
Parameters
by-name
Parameters
by-position
Batch requests
Version 4 Yes Yes Yes Yes Yes Yes

Documentation (JSON Schema)

Starting with JSON-RPC API version 3 a new way of API documentation has been introduced. All methods and data types are described using JSON Schema. This provides third party developers with an always complete and up-to-date documentation by calling JSONRPC.Introspect even during periods of heavy development. Furthermore the same method and data type specification that can be used by third party developers as a documentation is used by XBMC to check and verify method parameters and their values on every JSON-RPC request and allows to provide detailed error messages in case of a bad or missing parameter.

Supported features of JSON Schema

Schema IETF Draft 03
type Yes
properties Yes
patternProperties No
additionalProperties Yes
items Yes
additionalItems Yes
required Yes
dependencies No
minimum Yes
maximum Yes
Schema IETF Draft 03
exclusiveMinimum Yes
exclusiveMaximum Yes
minItems Yes
maxItems Yes
uniqueItems Yes
pattern No
minLength Yes
maxLength Yes
enum Yes
default Yes
Schema IETF Draft 03
title No
description Yes
format No
divisibleBy Yes
disallow No
extends Yes
id Yes
$ref Yes
$schema No
Hyper Schema No

Error message

If XBMC detects a bad or missing parameter in a JSON-RPC request it returns an error object. The JSON schema description of that error object is

{
  "type": "object",
  "properties": {
    "code": { "type": "integer", "required": true },
    "message": { "type": "string", "required": true },
    "data": { "type": "object",
      "properties": {
        "method": { "type": "string", "required": true },
        "stack": { "type": "object", "id": "Error.Stack",
          "properties": {
            "name": { "type": "string", "required": true },
            "type": { "type": "string", "required": true },
            "message": { "type": "string", "required": true },
            "property": { "$ref": "Error.Stack" }
          }
        }
      }
    }
  }
}

Namespaces

The XBMC JSON-RPC API is split up into namespaces, which contain methods that can be called. These namespaces are:

JSONRPC          A variety of standard JSONRPC calls
Player           Manages all available players
Playlist         Playlist modification
Files            Shares information
AudioLibrary     Audio Library information
VideoLibrary     Video Library information
Input            Allows limited navigation within XBMC
Application      Application information and control
System           System controls and information
XBMC             Dumping ground for very Kodi specific operations

Methods

Application

Application.GetProperties

Retrieves the values of the given properties
Permissions:

  • ReadData

Parameters:

  1. Application.Property.Name[] properties

Returns: Application.Property.Value

Application.Quit

Quit application
Permissions:

  • ControlPower

Parameters: None
Returns: string

Application.SetMute

Toggle mute/unmute
Permissions:

  • ControlPlayback

Parameters:

  1. mixed mute

Returns: boolean

Application.SetVolume

Set the current volume
Permissions:

  • ControlPlayback

Parameters:

  1. integer volume

Returns: integer

AudioLibrary

AudioLibrary.Clean

Cleans the audio library from non-existent items
Permissions:

  • RemoveData

Parameters: None
Returns: string

AudioLibrary.Export

Exports all items from the audio library
Permissions:

  • WriteFile

Parameters:

  1. [ mixed options ]

Returns: string

AudioLibrary.GetAlbumDetails

Retrieve details about a specific album
Permissions:

  • ReadData

Parameters:

  1. Library.Id albumid
  2. [ Audio.Fields.Album properties ]

Returns:

Type: object
Properties:

AudioLibrary.GetAlbums

Retrieve all albums from specified artist or genre
Permissions:

  • ReadData

Parameters:

  1. [ Library.Id artistid = -1 ]
  2. [ Library.Id genreid = -1 ]
  3. [ Audio.Fields.Album properties ]
  4. [ List.Limits limits ]
  5. [ List.Sort sort ]

Returns:

Type: object
Properties:

AudioLibrary.GetArtistDetails

Retrieve details about a specific artist
Permissions:

  • ReadData

Parameters:

  1. Library.Id artistid
  2. [ Audio.Fields.Artist properties ]

Returns:

Type: object
Properties:

AudioLibrary.GetArtists

Retrieve all artists
Permissions:

  • ReadData

Parameters:

  1. [ Optional.Boolean albumartistsonly = null ]
  2. [ Library.Id genreid = -1 ]
  3. [ Audio.Fields.Artist properties ]
  4. [ List.Limits limits ]
  5. [ List.Sort sort ]

Returns:

Type: object
Properties:

AudioLibrary.GetGenres

Retrieve all genres
Permissions:

  • ReadData

Parameters:

  1. [ Library.Fields.Genre properties ]
  2. [ List.Limits limits ]
  3. [ List.Sort sort ]

Returns:

Type: object
Properties:

AudioLibrary.GetRecentlyAddedAlbums

Retrieve recently added albums
Permissions:

  • ReadData

Parameters:

  1. [ Audio.Fields.Album properties ]
  2. [ List.Limits limits ]
  3. [ List.Sort sort ]

Returns:

Type: object
Properties:

AudioLibrary.GetRecentlyAddedSongs

Retrieve recently added songs
Permissions:

  • ReadData

Parameters:

  1. [ List.Amount albumlimit = -1 ]
  2. [ Audio.Fields.Song properties ]
  3. [ List.Limits limits ]
  4. [ List.Sort sort ]

Returns:

Type: object
Properties:

AudioLibrary.GetSongDetails

Retrieve details about a specific song
Permissions:

  • ReadData

Parameters:

  1. Library.Id songid
  2. [ Audio.Fields.Song properties ]

Returns:

Type: object
Properties:

AudioLibrary.GetSongs

Retrieve all songs from specified album, artist or genre
Permissions:

  • ReadData

Parameters:

  1. [ Library.Id artistid = -1 ]
  2. [ Library.Id albumid = -1 ]
  3. [ Library.Id genreid = -1 ]
  4. [ Audio.Fields.Song properties ]
  5. [ List.Limits limits ]
  6. [ List.Sort sort ]

Returns:

Type: object
Properties:

AudioLibrary.Scan

Scans the audio sources for new library items
Permissions:

  • UpdateData

Parameters: None
Returns: string

Files

Files.Download

Provides a way to download a given file (e.g. providing an URL to the real file location)
Permissions:

  • ReadData

Parameters:

  1. string path

Returns:

Type: object
Properties:

  • string path

Files.GetDirectory

Get the directories and files in the given directory
Permissions:

  • ReadData

Parameters:

  1. string directory
  2. [ Files.Media media = "files" ]
  3. [ List.Fields.All properties ]
  4. [ List.Sort sort ]

Returns:

Type: object
Properties:

Files.GetSources

Get the sources of the media windows
Permissions:

  • ReadData

Parameters:

  1. Files.Media media
  2. [ List.Limits limits ]
  3. [ List.Sort sort ]

Returns:

Type: object
Properties:

Input

Input.Back

Goes back in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

Input.Down

Navigate down in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

Input.Home

Goes to home window in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

Input.Left

Navigate left in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

Input.Right

Navigate right in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

Input.Select

Select current item in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

Input.Up

Navigate up in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

JSONRPC

JSONRPC.Introspect

Enumerates all actions and descriptions
Permissions:

  • ReadData

Parameters:

  1. [ boolean getdescriptions = True ]
  2. [ boolean getmetadata = False ]
  3. [ boolean filterbytransport = True ]
  4. [ object filter ]

Properties:

  • string type
  • string id
  • [ boolean getreferences = True ]

Returns:

Type: object

JSONRPC.NotifyAll

Notify all other connected clients
Permissions:

  • ReadData

Parameters:

  1. string sender
  2. string message
  3. [ any data = null ]

Returns: any

JSONRPC.Permission

Retrieve the clients permissions
Permissions:

  • ReadData

Parameters: None
Returns:

Type: object
Properties:

  • boolean navigate
  • boolean removedata
  • boolean controlplayback
  • boolean readdata
  • boolean updatedata
  • boolean writefile
  • boolean controlnotify
  • boolean controlpower

JSONRPC.Ping

Ping responder
Permissions:

  • ReadData

Parameters: None
Returns: string

JSONRPC.Version

Retrieve the jsonrpc protocol version
Permissions:

  • ReadData

Parameters: None
Returns: string

Player

Player.GetActivePlayers

Returns all active players
Permissions:

  • ReadData

Parameters: None
Returns:

Type: array

Player.GetItem

Retrieves the currently played item
Permissions:

  • ReadData

Parameters:

  1. Player.Id playerid
  2. [ List.Fields.All properties ]

Returns:

Type: object
Properties:

Player.GetProperties

Retrieves the values of the given properties
Permissions:

  • ReadData

Parameters:

  1. Player.Id playerid
  2. Player.Property.Name[] properties

Returns: Player.Property.Value

Player.GoNext

Go to next item on the playlist
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

Player.GoPrevious

Go to previous item on the playlist
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

Player.GoTo

Go to item at the given position in the playlist
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. Playlist.Position position

Returns: string

Player.MoveDown

If picture is zoomed move viewport down
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

Player.MoveLeft

If picture is zoomed move viewport left otherwise skip previous
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

Player.MoveRight

If picture is zoomed move viewport right otherwise skip next
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

Player.MoveUp

If picture is zoomed move viewport up
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

Player.Open

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.
Permissions:

  • ControlPlayback

Parameters:

  1. [ mixed item ]

Returns: string

Player.PlayPause

Pauses or unpause playback and returns the new state
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: Player.Speed

Player.Repeat

Set the repeat mode of the player
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. Player.Repeat state

Returns: string

Player.Rotate

Rotates current picture
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

Player.Seek

Seek through the playing item
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. mixed value

Returns:

Type: object
Properties:

Player.SetAudioStream

Set the audio stream played by the player
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. mixed stream

Returns: string

Player.SetSpeed

Set the speed of the current playback
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. mixed speed

Returns: Player.Speed

Player.SetSubtitle

Set the subtitle displayed by the player
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. mixed subtitle

Returns: string

Player.Shuffle

Shuffle items in the player
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

Player.Stop

Stops playback
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

Player.UnShuffle

Unshuffle items in the player
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

Player.Zoom

Zooms current picture
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. integer value

Returns: string

Player.ZoomIn

Zoom in once
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

Player.ZoomOut

Zoom out once
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

Playlist

Playlist.Add

Add item(s) to playlist
Permissions:

  • ControlPlayback

Parameters:

  1. Playlist.Id playlistid
  2. Playlist.Item item

Returns: string

Playlist.Clear

Clear playlist
Permissions:

  • ControlPlayback

Parameters:

  1. Playlist.Id playlistid

Returns: string

Playlist.GetItems

Get all items from playlist
Permissions:

  • ReadData

Parameters:

  1. Playlist.Id playlistid
  2. [ List.Fields.All properties ]
  3. [ List.Limits limits ]
  4. [ List.Sort sort ]

Returns:

Type: object
Properties:

Playlist.GetPlaylists

Returns all existing playlists
Permissions:

  • ReadData

Parameters: None
Returns:

Type: array

Playlist.GetProperties

Retrieves the values of the given properties
Permissions:

  • ReadData

Parameters:

  1. Playlist.Id playlistid
  2. Playlist.Property.Name[] properties

Returns: Playlist.Property.Value

Playlist.Insert

Insert item(s) into playlist. Does not work for picture playlists (aka slideshows).
Permissions:

  • ControlPlayback

Parameters:

  1. Playlist.Id playlistid
  2. Playlist.Position position
  3. Playlist.Item item

Returns: string

Playlist.Remove

Remove item from playlist. Does not work for picture playlists (aka slideshows).
Permissions:

  • ControlPlayback

Parameters:

  1. Playlist.Id playlistid
  2. Playlist.Position position

Returns: string

Playlist.Swap

Swap items in the playlist. Does not work for picture playlists (aka slideshows).
Permissions:

  • ControlPlayback

Parameters:

  1. Playlist.Id playlistid
  2. Playlist.Position position1
  3. Playlist.Position position2

Returns: string

System

System.GetProperties

Retrieves the values of the given properties
Permissions:

  • ReadData

Parameters:

  1. System.Property.Name[] properties

Returns: System.Property.Value

System.Hibernate

Puts the system running XBMC into hibernate mode
Permissions:

  • ControlPower

Parameters: None
Returns: string

System.Reboot

Reboots the system running XBMC
Permissions:

  • ControlPower

Parameters: None
Returns: string

System.Shutdown

Shuts the system running XBMC down
Permissions:

  • ControlPower

Parameters: None
Returns: string

System.Suspend

Suspends the system running XBMC
Permissions:

  • ControlPower

Parameters: None
Returns: string

VideoLibrary

VideoLibrary.Clean

Cleans the video library from non-existent items
Permissions:

  • RemoveData

Parameters: None
Returns: string

VideoLibrary.Export

Exports all items from the video library
Permissions:

  • WriteFile

Parameters:

  1. [ mixed options ]

Returns: string

VideoLibrary.GetEpisodeDetails

Retrieve details about a specific tv show episode
Permissions:

  • ReadData

Parameters:

  1. Library.Id episodeid
  2. [ Video.Fields.Episode properties ]

Returns:

Type: object
Properties:

VideoLibrary.GetEpisodes

Retrieve all tv show episodes
Permissions:

  • ReadData

Parameters:

  1. [ Library.Id tvshowid = -1 ]
  2. [ integer season = -1 ]
  3. [ Video.Fields.Episode properties ]
  4. [ List.Limits limits ]
  5. [ List.Sort sort ]

Returns:

Type: object
Properties:

VideoLibrary.GetGenres

Retrieve all genres
Permissions:

  • ReadData

Parameters:

  1. string type
  2. [ Library.Fields.Genre properties ]
  3. [ List.Limits limits ]
  4. [ List.Sort sort ]

Returns:

Type: object
Properties:

VideoLibrary.GetMovieDetails

Retrieve details about a specific movie
Permissions:

  • ReadData

Parameters:

  1. Library.Id movieid
  2. [ Video.Fields.Movie properties ]

Returns:

Type: object
Properties:

VideoLibrary.GetMovieSetDetails

Retrieve details about a specific movie set
Permissions:

  • ReadData

Parameters:

  1. Library.Id setid
  2. [ Video.Fields.MovieSet properties ]
  3. [ object movies ]

Properties:

Returns:

Type: object
Properties:

VideoLibrary.GetMovieSets

Retrieve all movie sets
Permissions:

  • ReadData

Parameters:

  1. [ Video.Fields.MovieSet properties ]
  2. [ List.Limits limits ]
  3. [ List.Sort sort ]

Returns:

Type: object
Properties:

VideoLibrary.GetMovies

Retrieve all movies
Permissions:

  • ReadData

Parameters:

  1. [ Video.Fields.Movie properties ]
  2. [ List.Limits limits ]
  3. [ List.Sort sort ]

Returns:

Type: object
Properties:

VideoLibrary.GetMusicVideoDetails

Retrieve details about a specific music video
Permissions:

  • ReadData

Parameters:

  1. Library.Id musicvideoid
  2. [ Video.Fields.MusicVideo properties ]

Returns:

Type: object
Properties:

VideoLibrary.GetMusicVideos

Retrieve all music videos
Permissions:

  • ReadData

Parameters:

  1. [ Library.Id artistid = -1 ]
  2. [ Library.Id albumid = -1 ]
  3. [ Video.Fields.MusicVideo properties ]
  4. [ List.Limits limits ]
  5. [ List.Sort sort ]

Returns:

Type: object
Properties:

VideoLibrary.GetRecentlyAddedEpisodes

Retrieve all recently added tv episodes
Permissions:

  • ReadData

Parameters:

  1. [ Video.Fields.Episode properties ]
  2. [ List.Limits limits ]
  3. [ List.Sort sort ]

Returns:

Type: object
Properties:

VideoLibrary.GetRecentlyAddedMovies

Retrieve all recently added movies
Permissions:

  • ReadData

Parameters:

  1. [ Video.Fields.Movie properties ]
  2. [ List.Limits limits ]
  3. [ List.Sort sort ]

Returns:

Type: object
Properties:

VideoLibrary.GetRecentlyAddedMusicVideos

Retrieve all recently added music videos
Permissions:

  • ReadData

Parameters:

  1. [ Video.Fields.MusicVideo properties ]
  2. [ List.Limits limits ]
  3. [ List.Sort sort ]

Returns:

Type: object
Properties:

VideoLibrary.GetSeasons

Retrieve all tv seasons
Permissions:

  • ReadData

Parameters:

  1. Library.Id tvshowid
  2. [ Video.Fields.Season properties ]
  3. [ List.Limits limits ]
  4. [ List.Sort sort ]

Returns:

Type: object
Properties:

VideoLibrary.GetTVShowDetails

Retrieve details about a specific tv show
Permissions:

  • ReadData

Parameters:

  1. Library.Id tvshowid
  2. [ Video.Fields.TVShow properties ]

Returns:

Type: object
Properties:

VideoLibrary.GetTVShows

Retrieve all tv shows
Permissions:

  • ReadData

Parameters:

  1. [ Video.Fields.TVShow properties ]
  2. [ List.Limits limits ]
  3. [ List.Sort sort ]

Returns:

Type: object
Properties:

VideoLibrary.Scan

Scans the video sources for new library items
Permissions:

  • UpdateData

Parameters: None
Returns: string

XBMC

XBMC.GetInfoBooleans

Retrieve info booleans about XBMC and the system
Permissions:

  • ReadData

Parameters:

  1. array[1..X] booleans

Returns:

Type: object

XBMC.GetInfoLabels

Retrieve info labels about XBMC and the system
Permissions:

  • ReadData

Parameters:

  1. array[1..X] labels

Returns:

Type: object


Global types

Application

Application.Property.Name

Type: string

Application.Property.Value

Type: object
Properties:

  • [ boolean muted = False ]
  • [ integer volume = 0 ]
  • [ object version ]

Properties:

    • integer major
    • string tag
    • integer minor
    • [ mixed revision = null ]
  • [ string name = "" ]

Array

Array.Integer

Type: array

Array.String

Type: array

Audio

Audio.Details.Album

Extends:


Properties:

  • [ string style = "" ]
  • [ string mood = "" ]
  • [ string albumlabel = "" ]
  • [ string theme = "" ]
  • Library.Id albumid
  • [ Library.Id artistid = -1 ]
  • [ string type = "" ]
  • [ string description = "" ]

Audio.Details.Artist

Extends:


Properties:

  • [ string style = "" ]
  • [ string description = "" ]
  • [ string musicbrainzartistid = "" ]
  • string artist
  • [ string formed = "" ]
  • [ string disbanded = "" ]
  • [ string born = "" ]
  • Library.Id artistid
  • [ string yearsactive = "" ]
  • [ string instrument = "" ]
  • [ string died = "" ]
  • [ string mood = "" ]

Audio.Details.Base

Extends:


Properties:

  • [ string genre = "" ]

Audio.Details.Media

Extends:


Properties:

  • [ integer rating = 0 ]
  • [ string title = "" ]
  • [ string artist = "" ]
  • [ string musicbrainzalbumartistid = "" ]
  • [ integer year = 0 ]
  • [ string musicbrainzalbumid = "" ]

Audio.Details.Song

Extends:


Properties:

  • [ string album = "" ]
  • [ string comment = "" ]
  • Library.Id songid
  • [ string musicbrainzartistid = "" ]
  • [ string lyrics = "" ]
  • [ integer track = 0 ]
  • [ string musicbrainztrackid = "" ]
  • [ Library.Id albumid = -1 ]
  • [ Library.Id artistid = -1 ]
  • [ string albumartist = "" ]
  • [ string file = "" ]
  • [ integer duration = 0 ]
  • [ integer playcount = 0 ]

Audio.Fields.Album

Extends:

Audio.Fields.Artist

Extends:

Audio.Fields.Song

Extends:

Configuration

Configuration

Type: object
Properties:

Configuration.Notifications

Type: object
Properties:

  • boolean gui
  • boolean system
  • boolean player
  • boolean audiolibrary
  • boolean other
  • boolean videolibrary

Files

Files.Media

Type: string

Global

Global.Time

Type: object
Properties:

  • integer hours
  • integer seconds
  • integer minutes
  • integer milliseconds

Item

Item.Details.Base

Type: object
Properties:

  • string label

Item.Fields.Base

Type: array

Library

Library.Details.Genre

Extends:


Properties:

  • Library.Id genreid
  • [ string thumbnail = "" ]
  • [ string title = "" ]

Library.Fields.Genre

Extends:

Library.Id

Type: integer

List

List.Amount

Type: integer

List.Fields.All

Extends:

List.Item.All

Extends:


Properties:

  • [ string comment = "" ]
  • [ Library.Id tvshowid = -1 ]
  • [ Array.String set ]
  • [ string lyrics = "" ]
  • [ string albumartist = "" ]
  • [ integer duration = 0 ]
  • [ Array.Integer setid ]
  • [ Library.Id id = -1 ]
  • [ string album = "" ]
  • [ string votes = "" ]
  • [ string mpaa = "" ]
  • [ string writer = "" ]
  • [ Library.Id albumid = -1 ]
  • [ string type = "unknown" ]
  • [ string plotoutline = "" ]
  • [ integer track = 0 ]
  • [ integer season = 0 ]
  • [ string musicbrainztrackid = "" ]
  • [ string imdbnumber = "" ]
  • [ string studio = "" ]
  • [ string showlink = "" ]
  • [ string showtitle = "" ]
  • [ integer episode = 0 ]
  • [ string musicbrainzartistid = "" ]
  • [ string productioncode = "" ]
  • [ string country = "" ]
  • [ string premiered = "" ]
  • [ string originaltitle = "" ]
  • [ Video.Cast cast ]
  • [ Library.Id artistid = -1 ]
  • [ string firstaired = "" ]
  • [ string tagline = "" ]
  • [ integer top250 = 0 ]
  • [ string trailer = "" ]

List.Item.File

Extends:


Properties:

  • string filetype
  • string file

List.Items.Sources

Type: array

List.Limits

Type: object
Properties:

  • [ integer start = 0 ]
  • [ integer end = -1 ]

List.LimitsReturned

Type: object
Properties:

  • [ integer start = 0 ]
  • integer total
  • [ integer end = -1 ]

List.Sort

Type: object
Properties:

  • [ string order = "ascending" ]
  • [ boolean ignorearticle = False ]
  • [ string method = "none" ]

Media

Media.Details.Base

Extends:


Properties:

  • [ string fanart = "" ]
  • [ string thumbnail = "" ]

Optional

Optional.Boolean

Type: mixed

Player

Player.Audio.Stream

Type: object
Properties:

  • integer index
  • string name
  • string language

Player.Audio.Stream.Extended

Extends:


Properties:

  • integer channels
  • string codec
  • integer bitrate

Player.Id

Type: integer

Player.Notifications.Data

Type: object
Properties:

Player.Notifications.Item

Type: mixed

Player.Notifications.Item.Type

Type: string

Player.Notifications.Player

Type: object
Properties:

Player.Notifications.Player.Seek

Extends:


Properties:

Player.Position.Percentage

Type: number

Player.Property.Name

Type: string

Player.Property.Value

Type: object
Properties:

Player.Repeat

Type: string

Player.Speed

Type: object
Properties:

  • [ integer speed = 0 ]

Player.Subtitle

Type: object
Properties:

  • integer index
  • string name
  • string language

Player.Type

Type: string

Playlist

Playlist.Id

Type: integer

Playlist.Item

Type: mixed

Playlist.Position

Type: integer

Playlist.Property.Name

Type: string

Playlist.Property.Value

Type: object
Properties:

Playlist.Type

Type: string

System

System.Property.Name

Type: string

System.Property.Value

Type: object
Properties:

  • [ boolean canreboot = False ]
  • [ boolean cansuspend = False ]
  • [ boolean canhibernate = False ]
  • [ boolean canshutdown = False ]

Video

Video.Cast

Type: array

Video.Details.Base

Extends:


Properties:

  • [ integer playcount = 0 ]

Video.Details.Episode

Extends:


Properties:

  • [ number rating = 0 ]
  • [ Library.Id tvshowid = -1 ]
  • [ string votes = "" ]
  • [ integer episode = 0 ]
  • [ string productioncode = "" ]
  • [ integer season = 0 ]
  • [ string writer = "" ]
  • Library.Id episodeid
  • [ string originaltitle = "" ]
  • [ Video.Cast cast ]
  • [ string firstaired = "" ]
  • [ string showtitle = "" ]

Video.Details.File

Extends:


Properties:

Video.Details.Item

Extends:


Properties:

  • [ string plot = "" ]
  • [ string lastplayed = "" ]
  • [ string file = "" ]

Video.Details.Media

Extends:


Properties:

  • [ string title = "" ]

Video.Details.Movie

Extends:


Properties:

  • [ number rating = 0 ]
  • [ Array.String set ]
  • [ integer year = 0 ]
  • [ Array.Integer setid ]
  • [ string votes = "" ]
  • [ string tagline = "" ]
  • [ string writer = "" ]
  • [ string plotoutline = "" ]
  • [ string sorttitle = "" ]
  • [ string imdbnumber = "" ]
  • [ string studio = "" ]
  • [ string showlink = "" ]
  • [ string genre = "" ]
  • Library.Id movieid
  • [ string productioncode = "" ]
  • [ string country = "" ]
  • [ string premiered = "" ]
  • [ string originaltitle = "" ]
  • [ Video.Cast cast ]
  • [ string mpaa = "" ]
  • [ integer top250 = 0 ]
  • [ string trailer = "" ]
  • [ array streamdetails = "" ]

Video.Details.MovieSet

Extends:


Properties:

Video.Details.MovieSet.Extended

Extends:


Properties:

Video.Details.MusicVideo

Extends:


Properties:

  • [ string album = "" ]
  • [ string artist = "" ]
  • [ integer track = 0 ]
  • [ string studio = "" ]
  • [ integer year = 0 ]
  • [ string genre = "" ]
  • Library.Id musicvideoid

Video.Details.Season

Extends:


Properties:

  • integer season
  • [ Library.Id tvshowid = -1 ]
  • [ integer episode = 0 ]
  • [ string showtitle = "" ]

Video.Details.TVShow

Extends:


Properties:

  • [ string episodeguide = "" ]
  • Library.Id tvshowid
  • [ integer episode = 0 ]
  • [ string imdbnumber = "" ]
  • [ number rating = 0 ]
  • [ string mpaa = "" ]
  • [ integer year = 0 ]
  • [ string votes = "" ]
  • [ string premiered = "" ]
  • [ string originaltitle = "" ]
  • [ Video.Cast cast ]
  • [ string studio = "" ]
  • [ string sorttitle = "" ]
  • [ string genre = "" ]

Video.Fields.Episode

Extends:

Video.Fields.Movie

Extends:

Video.Fields.MovieSet

Extends:

Video.Fields.MusicVideo

Extends:

Video.Fields.Season

Extends:

Video.Fields.TVShow

Extends:

Video.Resume

Type: object
Properties:

  • [ number position = 0 ]
  • [ number total = 0 ]

Video.Streams

Type: object
Properties:

  • [ array[1..X] video ]
  • [ array[1..X] audio ]
  • [ array[1..X] subtitle ]


Notifications

AudioLibrary

AudioLibrary.OnRemove

An audio item has been removed.
Parameters:

  1. string sender
  2. object data

Properties:

AudioLibrary.OnUpdate

An audio item has been updated.
Parameters:

  1. string sender
  2. object data

Properties:

Player

Player.OnPause

Playback of a media item has been paused. If there is no ID available extra information will be provided.
Parameters:

  1. string sender
  2. Player.Notifications.Data data

Player.OnPlay

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.
Parameters:

  1. string sender
  2. Player.Notifications.Data data

Player.OnSeek

The playback position has been changed. If there is no ID available extra information will be provided.
Parameters:

  1. string sender
  2. object data

Properties:

Player.OnSpeedChanged

Speed of the playback of a media item has been changed. If there is no ID available extra information will be provided.
Parameters:

  1. string sender
  2. Player.Notifications.Data data

Player.OnStop

Playback of a media item has been stopped. If there is no ID available extra information will be provided.
Parameters:

  1. string sender
  2. object data

Properties:

System

System.OnLowBattery

The system is on low battery.
Parameters:

  1. string sender
  2. null data

System.OnQuit

XBMC will be closed.
Parameters:

  1. string sender
  2. null data

System.OnRestart

The system will be restarted.
Parameters:

  1. string sender
  2. null data

System.OnSleep

The system will be suspended.
Parameters:

  1. string sender
  2. null data

System.OnWake

The system woke up from suspension.
Parameters:

  1. string sender
  2. null data

VideoLibrary

VideoLibrary.OnRemove

A video item has been removed.
Parameters:

  1. string sender
  2. object data

Properties:

VideoLibrary.OnUpdate

A video item has been updated.
Parameters:

  1. string sender
  2. object data

Properties:

  • [ integer playcount = -1 ]
  • string type
  • Library.Id id


External links