XBMC will be renamed to Kodi for v14. Read here for more details

JSON-RPC API/v4

From Kodi
Jump to: navigation, search
Home icon grey.png   ▶ Development ▶ JSON-RPC API ▶ v4

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.

Contents

1 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

2 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.

2.1 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

3 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" }
          }
        }
      }
    }
  }
}

4 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 {{subst:Name}} specific operations

5 Methods

5.1 Application

5.1.1 Application.GetProperties

Retrieves the values of the given properties
Permissions:

  • ReadData

Parameters:

  1. Application.Property.Name[] properties

Returns: Application.Property.Value

5.1.2 Application.Quit

Quit application
Permissions:

  • ControlPower

Parameters: None
Returns: string

5.1.3 Application.SetMute

Toggle mute/unmute
Permissions:

  • ControlPlayback

Parameters:

  1. mixed mute

Returns: boolean

5.1.4 Application.SetVolume

Set the current volume
Permissions:

  • ControlPlayback

Parameters:

  1. integer volume

Returns: integer

5.2 AudioLibrary

5.2.1 AudioLibrary.Clean

Cleans the audio library from non-existent items
Permissions:

  • RemoveData

Parameters: None
Returns: string

5.2.2 AudioLibrary.Export

Exports all items from the audio library
Permissions:

  • WriteFile

Parameters:

  1. [ mixed options ]

Returns: string

5.2.3 AudioLibrary.GetAlbumDetails

Retrieve details about a specific album
Permissions:

  • ReadData

Parameters:

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

Returns:

Type: object
Properties:

5.2.4 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:

5.2.5 AudioLibrary.GetArtistDetails

Retrieve details about a specific artist
Permissions:

  • ReadData

Parameters:

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

Returns:

Type: object
Properties:

5.2.6 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:

5.2.7 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:

5.2.8 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:

5.2.9 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:

5.2.10 AudioLibrary.GetSongDetails

Retrieve details about a specific song
Permissions:

  • ReadData

Parameters:

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

Returns:

Type: object
Properties:

5.2.11 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:

5.2.12 AudioLibrary.Scan

Scans the audio sources for new library items
Permissions:

  • UpdateData

Parameters: None
Returns: string

5.3 Files

5.3.1 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

5.3.2 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:

5.3.3 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:

5.4 Input

5.4.1 Input.Back

Goes back in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

5.4.2 Input.Down

Navigate down in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

5.4.3 Input.Home

Goes to home window in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

5.4.4 Input.Left

Navigate left in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

5.4.5 Input.Right

Navigate right in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

5.4.6 Input.Select

Select current item in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

5.4.7 Input.Up

Navigate up in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

5.5 JSONRPC

5.5.1 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

5.5.2 JSONRPC.NotifyAll

Notify all other connected clients
Permissions:

  • ReadData

Parameters:

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

Returns: any

5.5.3 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

5.5.4 JSONRPC.Ping

Ping responder
Permissions:

  • ReadData

Parameters: None
Returns: string

5.5.5 JSONRPC.Version

Retrieve the jsonrpc protocol version
Permissions:

  • ReadData

Parameters: None
Returns: string

5.6 Player

5.6.1 Player.GetActivePlayers

Returns all active players
Permissions:

  • ReadData

Parameters: None
Returns:

Type: array

5.6.2 Player.GetItem

Retrieves the currently played item
Permissions:

  • ReadData

Parameters:

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

Returns:

Type: object
Properties:

5.6.3 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

5.6.4 Player.GoNext

Go to next item on the playlist
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

5.6.5 Player.GoPrevious

Go to previous item on the playlist
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

5.6.6 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

5.6.7 Player.MoveDown

If picture is zoomed move viewport down
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

5.6.8 Player.MoveLeft

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

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

5.6.9 Player.MoveRight

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

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

5.6.10 Player.MoveUp

If picture is zoomed move viewport up
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

5.6.11 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

5.6.12 Player.PlayPause

Pauses or unpause playback and returns the new state
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: Player.Speed

5.6.13 Player.Repeat

Set the repeat mode of the player
Permissions:

  • ControlPlayback

Parameters:

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

Returns: string

5.6.14 Player.Rotate

Rotates current picture
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

5.6.15 Player.Seek

Seek through the playing item
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. mixed value

Returns:

Type: object
Properties:

5.6.16 Player.SetAudioStream

Set the audio stream played by the player
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. mixed stream

Returns: string

5.6.17 Player.SetSpeed

Set the speed of the current playback
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. mixed speed

Returns: Player.Speed

5.6.18 Player.SetSubtitle

Set the subtitle displayed by the player
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. mixed subtitle

Returns: string

5.6.19 Player.Shuffle

Shuffle items in the player
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

5.6.20 Player.Stop

Stops playback
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

5.6.21 Player.UnShuffle

Unshuffle items in the player
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

5.6.22 Player.Zoom

Zooms current picture
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. integer value

Returns: string

5.6.23 Player.ZoomIn

Zoom in once
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

5.6.24 Player.ZoomOut

Zoom out once
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

5.7 Playlist

5.7.1 Playlist.Add

Add item(s) to playlist
Permissions:

  • ControlPlayback

Parameters:

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

Returns: string

5.7.2 Playlist.Clear

Clear playlist
Permissions:

  • ControlPlayback

Parameters:

  1. Playlist.Id playlistid

Returns: string

5.7.3 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:

5.7.4 Playlist.GetPlaylists

Returns all existing playlists
Permissions:

  • ReadData

Parameters: None
Returns:

Type: array

5.7.5 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

5.7.6 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

5.7.7 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

5.7.8 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

5.8 System

5.8.1 System.GetProperties

Retrieves the values of the given properties
Permissions:

  • ReadData

Parameters:

  1. System.Property.Name[] properties

Returns: System.Property.Value

5.8.2 System.Hibernate

Puts the system running XBMC into hibernate mode
Permissions:

  • ControlPower

Parameters: None
Returns: string

5.8.3 System.Reboot

Reboots the system running XBMC
Permissions:

  • ControlPower

Parameters: None
Returns: string

5.8.4 System.Shutdown

Shuts the system running XBMC down
Permissions:

  • ControlPower

Parameters: None
Returns: string

5.8.5 System.Suspend

Suspends the system running XBMC
Permissions:

  • ControlPower

Parameters: None
Returns: string

5.9 VideoLibrary

5.9.1 VideoLibrary.Clean

Cleans the video library from non-existent items
Permissions:

  • RemoveData

Parameters: None
Returns: string

5.9.2 VideoLibrary.Export

Exports all items from the video library
Permissions:

  • WriteFile

Parameters:

  1. [ mixed options ]

Returns: string

5.9.3 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:

5.9.4 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:

5.9.5 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:

5.9.6 VideoLibrary.GetMovieDetails

Retrieve details about a specific movie
Permissions:

  • ReadData

Parameters:

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

Returns:

Type: object
Properties:

5.9.7 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:

5.9.8 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:

5.9.9 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:

5.9.10 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:

5.9.11 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:

5.9.12 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:

5.9.13 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:

5.9.14 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:

5.9.15 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:

5.9.16 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:

5.9.17 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:

5.9.18 VideoLibrary.Scan

Scans the video sources for new library items
Permissions:

  • UpdateData

Parameters: None
Returns: string

5.10 XBMC

5.10.1 XBMC.GetInfoBooleans

Retrieve info booleans about XBMC and the system
Permissions:

  • ReadData

Parameters:

  1. array[1..X] booleans

Returns:

Type: object

5.10.2 XBMC.GetInfoLabels

Retrieve info labels about XBMC and the system
Permissions:

  • ReadData

Parameters:

  1. array[1..X] labels

Returns:

Type: object


6 Global types

6.1 Application

6.1.1 Application.Property.Name

Type: string

6.1.2 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 = "" ]

6.2 Array

6.2.1 Array.Integer

Type: array

6.2.2 Array.String

Type: array

6.3 Audio

6.3.1 Audio.Details.Album

Extends:


Properties:

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

6.3.2 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 = "" ]

6.3.3 Audio.Details.Base

Extends:


Properties:

  • [ string genre = "" ]

6.3.4 Audio.Details.Media

Extends:


Properties:

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

6.3.5 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 ]

6.3.6 Audio.Fields.Album

Extends:

6.3.7 Audio.Fields.Artist

Extends:

6.3.8 Audio.Fields.Song

Extends:

6.4 Configuration

6.4.1 Configuration

Type: object
Properties:

6.4.2 Configuration.Notifications

Type: object
Properties:

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

6.5 Files

6.5.1 Files.Media

Type: string

6.6 Global

6.6.1 Global.Time

Type: object
Properties:

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

6.7 Item

6.7.1 Item.Details.Base

Type: object
Properties:

  • string label

6.7.2 Item.Fields.Base

Type: array

6.8 Library

6.8.1 Library.Details.Genre

Extends:


Properties:

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

6.8.2 Library.Fields.Genre

Extends:

6.8.3 Library.Id

Type: integer

6.9 List

6.9.1 List.Amount

Type: integer

6.9.2 List.Fields.All

Extends:

6.9.3 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 = "" ]

6.9.4 List.Item.File

Extends:


Properties:

  • string filetype
  • string file

6.9.5 List.Items.Sources

Type: array

6.9.6 List.Limits

Type: object
Properties:

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

6.9.7 List.LimitsReturned

Type: object
Properties:

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

6.9.8 List.Sort

Type: object
Properties:

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

6.10 Media

6.10.1 Media.Details.Base

Extends:


Properties:

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

6.11 Optional

6.11.1 Optional.Boolean

Type: mixed

6.12 Player

6.12.1 Player.Audio.Stream

Type: object
Properties:

  • integer index
  • string name
  • string language

6.12.2 Player.Audio.Stream.Extended

Extends:


Properties:

  • integer channels
  • string codec
  • integer bitrate

6.12.3 Player.Id

Type: integer

6.12.4 Player.Notifications.Data

Type: object
Properties:

6.12.5 Player.Notifications.Item

Type: mixed

6.12.6 Player.Notifications.Item.Type

Type: string

6.12.7 Player.Notifications.Player

Type: object
Properties:

6.12.8 Player.Notifications.Player.Seek

Extends:


Properties:

6.12.9 Player.Position.Percentage

Type: number

6.12.10 Player.Property.Name

Type: string

6.12.11 Player.Property.Value

Type: object
Properties:

6.12.12 Player.Repeat

Type: string

6.12.13 Player.Speed

Type: object
Properties:

  • [ integer speed = 0 ]

6.12.14 Player.Subtitle

Type: object
Properties:

  • integer index
  • string name
  • string language

6.12.15 Player.Type

Type: string

6.13 Playlist

6.13.1 Playlist.Id

Type: integer

6.13.2 Playlist.Item

Type: mixed

6.13.3 Playlist.Position

Type: integer

6.13.4 Playlist.Property.Name

Type: string

6.13.5 Playlist.Property.Value

Type: object
Properties:

6.13.6 Playlist.Type

Type: string

6.14 System

6.14.1 System.Property.Name

Type: string

6.14.2 System.Property.Value

Type: object
Properties:

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

6.15 Video

6.15.1 Video.Cast

Type: array

6.15.2 Video.Details.Base

Extends:


Properties:

  • [ integer playcount = 0 ]

6.15.3 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 = "" ]

6.15.4 Video.Details.File

Extends:


Properties:

6.15.5 Video.Details.Item

Extends:


Properties:

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

6.15.6 Video.Details.Media

Extends:


Properties:

  • [ string title = "" ]

6.15.7 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 = "" ]

6.15.8 Video.Details.MovieSet

Extends:


Properties:

6.15.9 Video.Details.MovieSet.Extended

Extends:


Properties:

6.15.10 Video.Details.MusicVideo

Extends:


Properties:

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

6.15.11 Video.Details.Season

Extends:


Properties:

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

6.15.12 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 = "" ]

6.15.13 Video.Fields.Episode

Extends:

6.15.14 Video.Fields.Movie

Extends:

6.15.15 Video.Fields.MovieSet

Extends:

6.15.16 Video.Fields.MusicVideo

Extends:

6.15.17 Video.Fields.Season

Extends:

6.15.18 Video.Fields.TVShow

Extends:

6.15.19 Video.Resume

Type: object
Properties:

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

6.15.20 Video.Streams

Type: object
Properties:

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


7 Notifications

7.1 AudioLibrary

7.1.1 AudioLibrary.OnRemove

An audio item has been removed.
Parameters:

  1. string sender
  2. object data

Properties:

7.1.2 AudioLibrary.OnUpdate

An audio item has been updated.
Parameters:

  1. string sender
  2. object data

Properties:

7.2 Player

7.2.1 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

7.2.2 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

7.2.3 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:

7.2.4 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

7.2.5 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:

7.3 System

7.3.1 System.OnLowBattery

The system is on low battery.
Parameters:

  1. string sender
  2. null data

7.3.2 System.OnQuit

XBMC will be closed.
Parameters:

  1. string sender
  2. null data

7.3.3 System.OnRestart

The system will be restarted.
Parameters:

  1. string sender
  2. null data

7.3.4 System.OnSleep

The system will be suspended.
Parameters:

  1. string sender
  2. null data

7.3.5 System.OnWake

The system woke up from suspension.
Parameters:

  1. string sender
  2. null data

7.4 VideoLibrary

7.4.1 VideoLibrary.OnRemove

A video item has been removed.
Parameters:

  1. string sender
  2. object data

Properties:

7.4.2 VideoLibrary.OnUpdate

A video item has been updated.
Parameters:

  1. string sender
  2. object data

Properties:

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

8 See also

9 External links

Personal tools
Namespaces

Variants
Actions
Navigation
Wiki help
Toolbox