XBMC v13.1 "Gotham" has been released! See Gotham FAQ for details.

JSON-RPC API/v6

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

Version 6 is a stable version of XBMC's JSON-RPC API and is published with the release of XBMC v12 (Frodo) and v13 (Gotham) . It comes with support for WebSockets as an alternative transport for third party clients. Using WebSockets will allow webinterfaces (which are currently restricted to the HTTP transport only) to get access to a bidirectional transport with XBMC's JSON-RPC API and can therefore also profit from additional features like notifications.

Some of the methods have been changed or removed, so v6 is not 100% backwards compatible with older versions. A rough and incomplete list of changes compared to version 4 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 6 Yes Yes Yes Yes Yes Yes

2 Documentation (JSON Schema)

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
Favourites       Favourites GetFavourites and AddFavourite
Profiles         Support for Profiles operations to XBMC. 
Settings         Allows manipulation of {{subst:Name}} settings.
Textures         with GetTextures and RemoveTexture
XBMC             Dumping ground for very {{subst:Name}} specific operations

5 Methods

5.1 Addons

5.1.1 Addons.ExecuteAddon

Executes the given addon with the given parameters (if possible)
Permissions:

  • ExecuteAddon

Parameters:

  1. string addonid
  2. [ mixed params = null ]
  3. [ boolean wait = False ]

Returns: string

5.1.2 Addons.GetAddonDetails

Gets the details of a specific addon
Permissions:

  • ReadData

Parameters:

  1. string addonid
  2. [ Addon.Fields properties ]

Returns:

Type: object
Properties:

5.1.3 Addons.GetAddons

Gets all available addons
Permissions:

  • ReadData

Parameters:

  1. [ Addon.Types type = "unknown" ]
  2. [ Addon.Content content = "unknown" ]
  3. [ mixed enabled = "all" ]
  4. [ Addon.Fields properties ]
  5. [ List.Limits limits ]

Returns:

Type: object
Properties:

5.1.4 Addons.SetAddonEnabled

Enables/Disables a specific addon
Permissions:

  • ManageAddon

Parameters:

  1. string addonid
  2. Global.Toggle enabled

Returns: string

5.2 Application

5.2.1 Application.GetProperties

Retrieves the values of the given properties
Permissions:

  • ReadData

Parameters:

  1. Application.Property.Name[] properties

Returns: Application.Property.Value

5.2.2 Application.Quit

Quit application
Permissions:

  • ControlPower

Parameters: None
Returns: string

5.2.3 Application.SetMute

Toggle mute/unmute
Permissions:

  • ControlPlayback

Parameters:

  1. Global.Toggle mute

Returns: boolean

5.2.4 Application.SetVolume

Set the current volume
Permissions:

  • ControlPlayback

Parameters:

  1. mixed volume

Returns: integer

5.3 AudioLibrary

5.3.1 AudioLibrary.Clean

Cleans the audio library from non-existent items
Permissions:

  • RemoveData

Parameters: None
Returns: string

5.3.2 AudioLibrary.Export

Exports all items from the audio library
Permissions:

  • WriteFile

Parameters:

  1. [ mixed options ]

Returns: string

5.3.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.3.4 AudioLibrary.GetAlbums

Retrieve all albums from specified artist or genre
Permissions:

  • ReadData

Parameters:

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

Returns:

Type: object
Properties:

5.3.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.3.6 AudioLibrary.GetArtists

Retrieve all artists
Permissions:

  • ReadData

Parameters:

  1. [ Optional.Boolean albumartistsonly = null ]
  2. [ Audio.Fields.Artist properties ]
  3. [ List.Limits limits ]
  4. [ List.Sort sort ]
  5. [ mixed filter ]

Returns:

Type: object
Properties:

5.3.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.3.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.3.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.3.10 AudioLibrary.GetRecentlyPlayedAlbums

Retrieve recently played albums
Permissions:

  • ReadData

Parameters:

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

Returns:

Type: object
Properties:

5.3.11 AudioLibrary.GetRecentlyPlayedSongs

Retrieve recently played songs
Permissions:

  • ReadData

Parameters:

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

Returns:

Type: object
Properties:

5.3.12 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.3.13 AudioLibrary.GetSongs

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

  • ReadData

Parameters:

  1. [ Audio.Fields.Song properties ]
  2. [ List.Limits limits ]
  3. [ List.Sort sort ]
  4. [ mixed filter ]

Returns:

Type: object
Properties:

5.3.14 AudioLibrary.Scan

Scans the audio sources for new library items
Permissions:

  • UpdateData

Parameters:

  1. [ string directory = "" ]

Returns: string

5.3.15 AudioLibrary.SetAlbumDetails

Update the given album with the given details
Permissions:

  • UpdateData

Parameters:

  1. Library.Id albumid
  2. [ Optional.String title = null ]
  3. [ mixed artist = null ]
  4. [ Optional.String description = null ]
  5. [ mixed genre = null ]
  6. [ mixed theme = null ]
  7. [ mixed mood = null ]
  8. [ mixed style = null ]
  9. [ Optional.String type = null ]
  10. [ Optional.String albumlabel = null ]
  11. [ Optional.Integer rating = null ]
  12. [ Optional.Integer year = null ]

Returns: string

5.3.16 AudioLibrary.SetArtistDetails

Update the given artist with the given details
Permissions:

  • UpdateData

Parameters:

  1. Library.Id artistid
  2. [ Optional.String artist = null ]
  3. [ mixed instrument = null ]
  4. [ mixed style = null ]
  5. [ mixed mood = null ]
  6. [ Optional.String born = null ]
  7. [ Optional.String formed = null ]
  8. [ Optional.String description = null ]
  9. [ mixed genre = null ]
  10. [ Optional.String died = null ]
  11. [ Optional.String disbanded = null ]
  12. [ mixed yearsactive = null ]

Returns: string

5.3.17 AudioLibrary.SetSongDetails

Update the given song with the given details
Permissions:

  • UpdateData

Parameters:

  1. Library.Id songid
  2. [ Optional.String title = null ]
  3. [ mixed artist = null ]
  4. [ mixed albumartist = null ]
  5. [ mixed genre = null ]
  6. [ Optional.Integer year = null ]
  7. [ Optional.Integer rating = null ]
  8. [ Optional.String album = null ]
  9. [ Optional.Integer track = null ]
  10. [ Optional.Integer disc = null ]
  11. [ Optional.Integer duration = null ]
  12. [ Optional.String comment = null ]
  13. [ Optional.String musicbrainztrackid = null ]
  14. [ Optional.String musicbrainzartistid = null ]
  15. [ Optional.String musicbrainzalbumid = null ]
  16. [ Optional.String musicbrainzalbumartistid = null ]

Returns: string

5.4 Files

5.4.1 Files.Download

Downloads the given file
Permissions:

  • ReadData

Parameters:

  1. string path

Returns: any

5.4.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.Files properties ]
  4. [ List.Sort sort ]

Returns:

Type: object
Properties:

5.4.3 Files.GetFileDetails

Get details for a specific file
Permissions:

  • ReadData

Parameters:

  1. string file
  2. [ Files.Media media = "files" ]
  3. [ List.Fields.Files properties ]

Returns:

Type: object
Properties:

5.4.4 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.5 Files.PrepareDownload

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 mode
  • string protocol
  • any details

5.5 GUI

5.5.1 GUI.ActivateWindow

Activates the given window
Permissions:

  • ControlGUI

Parameters:

  1. GUI.Window window
  2. [ array[1..X] parameters ]

Returns: string

5.5.2 GUI.GetProperties

Retrieves the values of the given properties
Permissions:

  • ReadData

Parameters:

  1. GUI.Property.Name[] properties

Returns: GUI.Property.Value

5.5.3 GUI.SetFullscreen

Toggle fullscreen/GUI
Permissions:

  • ControlGUI

Parameters:

  1. Global.Toggle fullscreen

Returns: boolean

5.5.4 GUI.ShowNotification

Shows a GUI notification
Permissions:

  • ControlGUI

Parameters:

  1. string title
  2. string message
  3. [ mixed image = "" ]
  4. [ integer displaytime = 5000 ]

Returns: string

5.6 Input

5.6.1 Input.Back

Goes back in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

5.6.2 Input.ContextMenu

Shows the context menu
Permissions:

  • Navigate

Parameters: None
Returns: string

5.6.3 Input.Down

Navigate down in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

5.6.4 Input.ExecuteAction

Execute a specific action
Permissions:

  • Navigate

Parameters:

  1. Input.Action action

Returns: string

5.6.5 Input.Home

Goes to home window in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

5.6.6 Input.Info

Shows the information dialog
Permissions:

  • Navigate

Parameters: None
Returns: string

5.6.7 Input.Left

Navigate left in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

5.6.8 Input.Right

Navigate right in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

5.6.9 Input.Select

Select current item in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

5.6.10 Input.SendText

Send a generic (unicode) text
Permissions:

  • Navigate

Parameters:

  1. string text
  2. [ boolean done = True ]

Returns: string

5.6.11 Input.ShowCodec

Show codec information of the playing item
Permissions:

  • Navigate

Parameters: None
Returns: string

5.6.12 Input.ShowOSD

Show the on-screen display for the current player
Permissions:

  • Navigate

Parameters: None
Returns: string

5.6.13 Input.Up

Navigate up in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

5.7 JSONRPC

5.7.1 JSONRPC.GetConfiguration

Get client-specific configurations
Permissions:

  • ReadData

Parameters: None
Returns: Configuration

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

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

Returns:

Type: object

5.7.3 JSONRPC.NotifyAll

Notify all other connected clients
Permissions:

  • ReadData

Parameters:

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

Returns: any

5.7.4 JSONRPC.Permission

Retrieve the clients permissions
Permissions:

  • ReadData

Parameters: None
Returns:

Type: object
Properties:

  • boolean readdata
  • boolean writefile
  • boolean controlpvr
  • boolean controlsystem
  • boolean removedata
  • boolean controlplayback
  • boolean navigate
  • boolean controlpower
  • boolean executeaddon
  • boolean manageaddon
  • boolean controlgui
  • boolean controlnotify
  • boolean updatedata

5.7.5 JSONRPC.Ping

Ping responder
Permissions:

  • ReadData

Parameters: None
Returns: string

5.7.6 JSONRPC.SetConfiguration

Change the client-specific configuration
Permissions:

  • ControlNotify

Parameters:

  1. [ object notifications ]

Properties:

Returns: Configuration

5.7.7 JSONRPC.Version

Retrieve the JSON-RPC protocol version.
Permissions:

  • ReadData

Parameters: None
Returns:

Type: object
Properties:

  • integer minor
  • integer patch
  • integer major

5.8 PVR

5.8.1 PVR.GetChannelDetails

Retrieves the details of a specific channel
Permissions:

  • ReadData

Parameters:

  1. Library.Id channelid
  2. [ PVR.Fields.Channel properties ]

Returns:

Type: object
Properties:

5.8.2 PVR.GetChannelGroupDetails

Retrieves the details of a specific channel group
Permissions:

  • ReadData

Parameters:

  1. PVR.ChannelGroup.Id channelgroupid
  2. [ object channels ]

Properties:

Returns:

Type: object
Properties:

5.8.3 PVR.GetChannelGroups

Retrieves the channel groups for the specified type
Permissions:

  • ReadData

Parameters:

  1. PVR.Channel.Type channeltype
  2. [ List.Limits limits ]

Returns:

Type: object
Properties:

5.8.4 PVR.GetChannels

Retrieves the channel list
Permissions:

  • ReadData

Parameters:

  1. PVR.ChannelGroup.Id channelgroupid
  2. [ PVR.Fields.Channel properties ]
  3. [ List.Limits limits ]

Returns:

Type: object
Properties:

5.8.5 PVR.GetProperties

Retrieves the values of the given properties
Permissions:

  • ReadData

Parameters:

  1. PVR.Property.Name[] properties

Returns: PVR.Property.Value

5.8.6 PVR.Record

Toggle recording of a channel
Permissions:

  • ControlPVR

Parameters:

  1. [ Global.Toggle record = "toggle" ]
  2. [ mixed channel = "current" ]

Returns: string

5.8.7 PVR.Scan

Starts a channel scan
Permissions:

  • ControlPVR

Parameters: None
Returns: string

5.9 Player

5.9.1 Player.GetActivePlayers

Returns all active players
Permissions:

  • ReadData

Parameters: None
Returns:

Type: array

5.9.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.9.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.9.4 Player.GoTo

Go to previous/next/specific item in the playlist
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. mixed to

Returns: string

5.9.5 Player.Move

If picture is zoomed move viewport left/right/up/down otherwise skip previous/next
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. string direction

Returns: string

5.9.6 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 ]
  2. [ object options ]

Properties:

  • [ Optional.Boolean shuffled = null ]
  • [ mixed repeat = null ]
  • [ mixed resume = False ]

Returns: string

5.9.7 Player.PlayPause

Pauses or unpause playback and returns the new state
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. [ Global.Toggle play = "toggle" ]

Returns: Player.Speed

5.9.8 Player.Rotate

Rotates current picture
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. [ string value = "clockwise" ]

Returns: string

5.9.9 Player.Seek

Seek through the playing item
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. mixed value

Returns:

Type: object
Properties:

5.9.10 Player.SetAudioStream

Set the audio stream played by the player
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. mixed stream

Returns: string

5.9.11 Player.SetPartymode

Turn partymode on or off
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. Global.Toggle partymode

Returns: string

5.9.12 Player.SetRepeat

Set the repeat mode of the player
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. mixed repeat

Returns: string

5.9.13 Player.SetShuffle

Shuffle/Unshuffle items in the player
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. Global.Toggle shuffle

Returns: string

5.9.14 Player.SetSpeed

Set the speed of the current playback
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. mixed speed

Returns: Player.Speed

5.9.15 Player.SetSubtitle

Set the subtitle displayed by the player
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. mixed subtitle
  3. [ boolean enable = False ]

Returns: string

5.9.16 Player.Stop

Stops playback
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

5.9.17 Player.Zoom

Zoom current picture
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. mixed zoom

Returns: string

5.10 Playlist

5.10.1 Playlist.Add

Add item(s) to playlist
Permissions:

  • ControlPlayback

Parameters:

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

Returns: string

5.10.2 Playlist.Clear

Clear playlist
Permissions:

  • ControlPlayback

Parameters:

  1. Playlist.Id playlistid

Returns: string

5.10.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.10.4 Playlist.GetPlaylists

Returns all existing playlists
Permissions:

  • ReadData

Parameters: None
Returns:

Type: array

5.10.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.10.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.10.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.10.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.11 System

5.11.1 System.EjectOpticalDrive

Ejects or closes the optical disc drive (if available)
Permissions:

  • ControlSystem

Parameters: None
Returns: string

5.11.2 System.GetProperties

Retrieves the values of the given properties
Permissions:

  • ReadData

Parameters:

  1. System.Property.Name[] properties

Returns: System.Property.Value

5.11.3 System.Hibernate

Puts the system running XBMC into hibernate mode
Permissions:

  • ControlPower

Parameters: None
Returns: string

5.11.4 System.Reboot

Reboots the system running XBMC
Permissions:

  • ControlPower

Parameters: None
Returns: string

5.11.5 System.Shutdown

Shuts the system running XBMC down
Permissions:

  • ControlPower

Parameters: None
Returns: string

5.11.6 System.Suspend

Suspends the system running XBMC
Permissions:

  • ControlPower

Parameters: None
Returns: string

5.12 VideoLibrary

5.12.1 VideoLibrary.Clean

Cleans the video library from non-existent items
Permissions:

  • RemoveData

Parameters: None
Returns: string

5.12.2 VideoLibrary.Export

Exports all items from the video library
Permissions:

  • WriteFile

Parameters:

  1. [ mixed options ]

Returns: string

5.12.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.12.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 ]
  6. [ mixed filter ]

Returns:

Type: object
Properties:

5.12.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.12.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.12.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.12.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.12.9 VideoLibrary.GetMovies

Retrieve all movies
Permissions:

  • ReadData

Parameters:

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

Returns:

Type: object
Properties:

5.12.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.12.11 VideoLibrary.GetMusicVideos

Retrieve all music videos
Permissions:

  • ReadData

Parameters:

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

Returns:

Type: object
Properties:

5.12.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.12.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.12.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.12.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.12.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.12.17 VideoLibrary.GetTVShows

Retrieve all tv shows
Permissions:

  • ReadData

Parameters:

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

Returns:

Type: object
Properties:

5.12.18 VideoLibrary.RemoveEpisode

Removes the given episode from the library
Permissions:

  • RemoveData

Parameters:

  1. Library.Id episodeid

Returns: string

5.12.19 VideoLibrary.RemoveMovie

Removes the given movie from the library
Permissions:

  • RemoveData

Parameters:

  1. Library.Id movieid

Returns: string

5.12.20 VideoLibrary.RemoveMusicVideo

Removes the given music video from the library
Permissions:

  • RemoveData

Parameters:

  1. Library.Id musicvideoid

Returns: string

5.12.21 VideoLibrary.RemoveTVShow

Removes the given tv show from the library
Permissions:

  • RemoveData

Parameters:

  1. Library.Id tvshowid

Returns: string

5.12.22 VideoLibrary.Scan

Scans the video sources for new library items
Permissions:

  • UpdateData

Parameters:

  1. [ string directory = "" ]

Returns: string

5.12.23 VideoLibrary.SetEpisodeDetails

Update the given episode with the given details
Permissions:

  • UpdateData

Parameters:

  1. Library.Id episodeid
  2. [ Optional.String title = null ]
  3. [ Optional.Integer playcount = null ]
  4. [ Optional.Integer runtime = null ]
  5. [ mixed director = null ]
  6. [ Optional.String plot = null ]
  7. [ Optional.Number rating = null ]
  8. [ Optional.String votes = null ]
  9. [ Optional.String lastplayed = null ]
  10. [ mixed writer = null ]
  11. [ Optional.String firstaired = null ]
  12. [ Optional.String productioncode = null ]
  13. [ Optional.Integer season = null ]
  14. [ Optional.Integer episode = null ]
  15. [ Optional.String originaltitle = null ]
  16. [ Optional.String thumbnail = null ]
  17. [ Optional.String fanart = null ]
  18. [ mixed art = null ]

Returns: string

5.12.24 VideoLibrary.SetMovieDetails

Update the given movie with the given details
Permissions:

  • UpdateData

Parameters:

  1. Library.Id movieid
  2. [ Optional.String title = null ]
  3. [ Optional.Integer playcount = null ]
  4. [ Optional.Integer runtime = null ]
  5. [ mixed director = null ]
  6. [ mixed studio = null ]
  7. [ Optional.Integer year = null ]
  8. [ Optional.String plot = null ]
  9. [ mixed genre = null ]
  10. [ Optional.Number rating = null ]
  11. [ Optional.String mpaa = null ]
  12. [ Optional.String imdbnumber = null ]
  13. [ Optional.String votes = null ]
  14. [ Optional.String lastplayed = null ]
  15. [ Optional.String originaltitle = null ]
  16. [ Optional.String trailer = null ]
  17. [ Optional.String tagline = null ]
  18. [ Optional.String plotoutline = null ]
  19. [ mixed writer = null ]
  20. [ mixed country = null ]
  21. [ Optional.Integer top250 = null ]
  22. [ Optional.String sorttitle = null ]
  23. [ Optional.String set = null ]
  24. [ mixed showlink = null ]
  25. [ Optional.String thumbnail = null ]
  26. [ Optional.String fanart = null ]
  27. [ mixed tag = null ]
  28. [ mixed art = null ]

Returns: string

5.12.25 VideoLibrary.SetMusicVideoDetails

Update the given music video with the given details
Permissions:

  • UpdateData

Parameters:

  1. Library.Id musicvideoid
  2. [ Optional.String title = null ]
  3. [ Optional.Integer playcount = null ]
  4. [ Optional.Integer runtime = null ]
  5. [ mixed director = null ]
  6. [ mixed studio = null ]
  7. [ Optional.Integer year = null ]
  8. [ Optional.String plot = null ]
  9. [ Optional.String album = null ]
  10. [ mixed artist = null ]
  11. [ mixed genre = null ]
  12. [ Optional.Integer track = null ]
  13. [ Optional.String lastplayed = null ]
  14. [ Optional.String thumbnail = null ]
  15. [ Optional.String fanart = null ]
  16. [ mixed tag = null ]
  17. [ mixed art = null ]

Returns: string

5.12.26 VideoLibrary.SetTVShowDetails

Update the given tvshow with the given details
Permissions:

  • UpdateData

Parameters:

  1. Library.Id tvshowid
  2. [ Optional.String title = null ]
  3. [ Optional.Integer playcount = null ]
  4. [ mixed studio = null ]
  5. [ Optional.String plot = null ]
  6. [ mixed genre = null ]
  7. [ Optional.Number rating = null ]
  8. [ Optional.String mpaa = null ]
  9. [ Optional.String imdbnumber = null ]
  10. [ Optional.String premiered = null ]
  11. [ Optional.String votes = null ]
  12. [ Optional.String lastplayed = null ]
  13. [ Optional.String originaltitle = null ]
  14. [ Optional.String sorttitle = null ]
  15. [ Optional.String episodeguide = null ]
  16. [ Optional.String thumbnail = null ]
  17. [ Optional.String fanart = null ]
  18. [ mixed tag = null ]
  19. [ mixed art = null ]

Returns: string

5.13 XBMC

5.13.1 XBMC.GetInfoBooleans

Retrieve info booleans about XBMC and the system
Permissions:

  • ReadData

Parameters:

  1. array[1..X] booleans

Returns:

Type: object

5.13.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 Addon

6.1.1 Addon.Content

Type: string

6.1.2 Addon.Details

Extends:


Properties:

  • string addonid
  • [ string disclaimer = "" ]
  • [ string fanart = "" ]
  • [ mixed broken = null ]
  • [ string author = "" ]
  • [ boolean enabled = False ]
  • [ array extrainfo ]
  • [ string thumbnail = "" ]
  • [ string path = "" ]
  • [ array dependencies ]
  • Addon.Types type
  • [ string description = "" ]
  • [ string name = "" ]
  • [ string version = "" ]
  • [ string summary = "" ]
  • [ integer rating = 0 ]

6.1.3 Addon.Fields

Extends:

6.1.4 Addon.Types

Type: string

6.2 Application

6.2.1 Application.Property.Name

Type: string

6.2.2 Application.Property.Value

Type: object
Properties:

  • [ object version ]

Properties:

    • integer minor
    • string tag
    • integer major
    • [ mixed revision = null ]
  • [ string name = "" ]
  • [ integer volume = 0 ]
  • [ boolean muted = False ]

6.3 Array

6.3.1 Array.Integer

Type: array

6.3.2 Array.String

Type: array

6.4 Audio

6.4.1 Audio.Details.Album

Extends:


Properties:

6.4.2 Audio.Details.Artist

Extends:


Properties:

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

6.4.3 Audio.Details.Base

Extends:


Properties:

6.4.4 Audio.Details.Media

Extends:


Properties:

  • [ string displayartist = "" ]
  • [ Array.String artist ]
  • [ Array.Integer genreid ]
  • [ string musicbrainzalbumartistid = "" ]
  • [ integer year = 0 ]
  • [ integer rating = 0 ]
  • [ Array.Integer artistid ]
  • [ string title = "" ]
  • [ string musicbrainzalbumid = "" ]

6.4.5 Audio.Details.Song

Extends:


Properties:

  • [ string lyrics = "" ]
  • Library.Id songid
  • [ Array.Integer albumartistid ]
  • [ integer disc = 0 ]
  • [ string comment = "" ]
  • [ integer playcount = 0 ]
  • [ string album = "" ]
  • [ string file = "" ]
  • [ string lastplayed = "" ]
  • [ Library.Id albumid = -1 ]
  • [ string musicbrainzartistid = "" ]
  • [ Array.String albumartist ]
  • [ integer duration = 0 ]
  • [ string musicbrainztrackid = "" ]
  • [ integer track = 0 ]

6.4.6 Audio.Fields.Album

Extends:

6.4.7 Audio.Fields.Artist

Extends:

6.4.8 Audio.Fields.Song

Extends:

6.5 Configuration

6.5.1 Configuration

Type: object
Properties:

6.5.2 Configuration.Notifications

Type: object
Properties:

  • boolean gui
  • boolean other
  • boolean input
  • boolean videolibrary
  • boolean audiolibrary
  • boolean pvr
  • boolean playlist
  • boolean system
  • boolean player
  • boolean application

6.6 Files

6.6.1 Files.Media

Type: string

6.7 GUI

6.7.1 GUI.Property.Name

Type: string

6.7.2 GUI.Property.Value

Type: object
Properties:

  • [ object currentwindow ]

Properties:

    • string label
    • integer id
  • [ boolean fullscreen = False ]
  • [ object skin ]

Properties:

    • string id
    • [ string name = "" ]
  • [ object currentcontrol ]

Properties:

    • string label

6.7.3 GUI.Window

Type: string

6.8 Global

6.8.1 Global.IncrementDecrement

Type: string

6.8.2 Global.String.NotEmpty

Type: string

6.8.3 Global.Time

Type: object
Properties:

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

6.8.4 Global.Toggle

Type: mixed

6.9 Input

6.9.1 Input.Action

Type: string

6.10 Item

6.10.1 Item.Details.Base

Type: object
Properties:

  • string label

6.10.2 Item.Fields.Base

Type: array

6.11 Library

6.11.1 Library.Details.Genre

Extends:


Properties:

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

6.11.2 Library.Fields.Genre

Extends:

6.11.3 Library.Id

Type: integer

6.12 List

6.12.1 List.Amount

Type: integer

6.12.2 List.Fields.All

Extends:

6.12.3 List.Fields.Files

Extends:

6.12.4 List.Filter.Albums

Type: mixed

6.12.5 List.Filter.Artists

Type: mixed

6.12.6 List.Filter.Episodes

Type: mixed

6.12.7 List.Filter.Fields.Albums

Type: string

6.12.8 List.Filter.Fields.Artists

Type: string

6.12.9 List.Filter.Fields.Episodes

Type: string

6.12.10 List.Filter.Fields.Movies

Type: string

6.12.11 List.Filter.Fields.MusicVideos

Type: string

6.12.12 List.Filter.Fields.Songs

Type: string

6.12.13 List.Filter.Fields.TVShows

Type: string

6.12.14 List.Filter.Movies

Type: mixed

6.12.15 List.Filter.MusicVideos

Type: mixed

6.12.16 List.Filter.Operators

Type: string

6.12.17 List.Filter.Rule

Type: object
Properties:

6.12.18 List.Filter.Rule.Albums

Extends:


Properties:

6.12.19 List.Filter.Rule.Artists

Extends:


Properties:

6.12.20 List.Filter.Rule.Episodes

Extends:


Properties:

6.12.21 List.Filter.Rule.Movies

Extends:


Properties:

6.12.22 List.Filter.Rule.MusicVideos

Extends:


Properties:

6.12.23 List.Filter.Rule.Songs

Extends:


Properties:

6.12.24 List.Filter.Rule.TVShows

Extends:


Properties:

6.12.25 List.Filter.Songs

Type: mixed

6.12.26 List.Filter.TVShows

Type: mixed

6.12.27 List.Item.All

Extends:


Properties:

  • [ PVR.Channel.Type channeltype = "tv" ]
  • [ string channel = "" ]
  • [ string starttime = "" ]
  • [ string endtime = "" ]
  • [ integer channelnumber = 0 ]
  • [ boolean hidden = False ]
  • [ boolean locked = False ]

6.12.28 List.Item.Base

Extends:


Properties:

  • [ string sorttitle = "" ]
  • [ string productioncode = "" ]
  • [ Video.Cast cast ]
  • [ string votes = "" ]
  • [ integer duration = 0 ]
  • [ string trailer = "" ]
  • [ Library.Id albumid = -1 ]
  • [ string musicbrainzartistid = "" ]
  • [ string mpaa = "" ]
  • [ string albumlabel = "" ]
  • [ string originaltitle = "" ]
  • [ Array.String writer ]
  • [ Array.Integer albumartistid ]
  • [ string type = "unknown" ]
  • [ integer episode = 0 ]
  • [ string firstaired = "" ]
  • [ string showtitle = "" ]
  • [ Array.String country ]
  • [ Array.String mood ]
  • [ string set = "" ]
  • [ string musicbrainztrackid = "" ]
  • [ Array.String tag ]
  • [ string lyrics = "" ]
  • [ integer top250 = 0 ]
  • [ string comment = "" ]
  • [ string premiered = "" ]
  • [ Array.String showlink ]
  • [ Array.String style ]
  • [ string album = "" ]
  • [ Library.Id tvshowid = -1 ]
  • [ integer season = 0 ]
  • [ Array.String theme ]
  • [ string description = "" ]
  • [ Library.Id setid = -1 ]
  • [ integer track = 0 ]
  • [ string tagline = "" ]
  • [ string plotoutline = "" ]
  • [ integer watchedepisodes = 0 ]
  • [ Library.Id id = -1 ]
  • [ integer disc = 0 ]
  • [ Array.String albumartist ]
  • [ Array.String studio ]
  • [ object uniqueid ]
  • [ string episodeguide = "" ]
  • [ string imdbnumber = "" ]

6.12.29 List.Item.File

Extends:


Properties:

  • string filetype
  • [ integer size = 0 ]
  • [ string mimetype = "" ]
  • string file
  • [ string lastmodified = "" ]

6.12.30 List.Items.Sources

Type: array

6.12.31 List.Limits

Type: object
Properties:

6.12.32 List.LimitsReturned

Type: object
Properties:

  • [ List.Amount end = -1 ]
  • integer total
  • [ integer start = 0 ]

6.12.33 List.Sort

Type: object
Properties:

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

6.13 Media

6.13.1 Media.Artwork

Type: object
Properties:

6.13.2 Media.Details.Base

Extends:


Properties:

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

6.14 Notifications

6.14.1 Notifications.Item

Type: mixed

6.14.2 Notifications.Item.Type

Type: string

6.15 Optional

6.15.1 Optional.Boolean

Type: mixed

6.15.2 Optional.Integer

Type: mixed

6.15.3 Optional.Number

Type: mixed

6.15.4 Optional.String

Type: mixed

6.16 PVR

6.16.1 PVR.Channel.Type

Type: string

6.16.2 PVR.ChannelGroup.Id

Type: mixed

6.16.3 PVR.Details.Channel

Extends:


Properties:

  • [ PVR.Channel.Type channeltype = "tv" ]
  • [ string thumbnail = "" ]
  • [ string channel = "" ]
  • [ boolean hidden = False ]
  • Library.Id channelid
  • [ boolean locked = False ]
  • [ string lastplayed = "" ]

6.16.4 PVR.Details.ChannelGroup

Extends:


Properties:

6.16.5 PVR.Details.ChannelGroup.Extended

Extends:


Properties:

6.16.6 PVR.Fields.Channel

Extends:

6.16.7 PVR.Property.Name

Type: string

6.16.8 PVR.Property.Value

Type: object
Properties:

  • [ boolean scanning = False ]
  • [ boolean recording = False ]
  • [ boolean available = False ]

6.17 Player

6.17.1 Player.Audio.Stream

Type: object
Properties:

  • integer index
  • string language
  • string name

6.17.2 Player.Audio.Stream.Extended

Extends:


Properties:

  • integer channels
  • string codec
  • integer bitrate

6.17.3 Player.Id

Type: integer

6.17.4 Player.Notifications.Data

Type: object
Properties: