JSON-RPC API v6 (Frodo)

From Official Kodi Wiki
Revision as of 19:27, 2 December 2012 by >Montellese (Created page with "{{DevsHeader|'''XBMC (Frodo) JSON-RPC API'''}} {{DISPLAYTITLE:JSON-RPC API v6 (Frodo)}}{{JSON-RPC API nav}} <br /> {{Frodo}} <br /> Version 6 is a stable version of XBMC's JSON-R...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:DevsHeader

JSON-RPC Pages
Main JSON-RPC Page
- v8 (Krypton)
- v10 (Leia)
- v12 (Matrix)
- v13 (Nexus)
- v14 (Omega)
Examples
All JSON-RPC Pages


Template:Frodo
Version 6 is a stable version of XBMC's JSON-RPC API and is published with the release of Eden. 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.

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.

JSON-RPC 2.0 compatibility

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

Documentation (JSON Schema)

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 XBMC specific operations

Methods

Addons

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

Addons.GetAddonDetails

Gets the details of a specific addon
Permissions:

  • ReadData

Parameters:

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

Returns:

Type: object
Properties:

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:

Addons.SetAddonEnabled

Enables/Disables a specific addon
Permissions:

  • ManageAddon

Parameters:

  1. string addonid
  2. Global.Toggle enabled

Returns: string

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. Global.Toggle mute

Returns: boolean

Application.SetVolume

Set the current volume
Permissions:

  • ControlPlayback

Parameters:

  1. mixed 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. [ Audio.Fields.Album properties ]
  2. [ List.Limits limits ]
  3. [ List.Sort sort ]
  4. [ mixed filter ]

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. [ Audio.Fields.Artist properties ]
  3. [ List.Limits limits ]
  4. [ List.Sort sort ]
  5. [ mixed filter ]

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

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:

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. [ Audio.Fields.Song properties ]
  2. [ List.Limits limits ]
  3. [ List.Sort sort ]
  4. [ mixed filter ]

Returns:

Type: object
Properties:

AudioLibrary.Scan

Scans the audio sources for new library items
Permissions:

  • UpdateData

Parameters:

  1. [ string directory = "" ]

Returns: string

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

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

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

Files

Files.Download

Downloads the given file
Permissions:

  • ReadData

Parameters:

  1. string path

Returns: any

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:

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:

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:

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:

  • any details
  • string protocol
  • string mode

GUI

GUI.ActivateWindow

Activates the given window
Permissions:

  • ControlGUI

Parameters:

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

Returns: string

GUI.GetProperties

Retrieves the values of the given properties
Permissions:

  • ReadData

Parameters:

  1. GUI.Property.Name[] properties

Returns: GUI.Property.Value

GUI.SetFullscreen

Toggle fullscreen/GUI
Permissions:

  • ControlGUI

Parameters:

  1. Global.Toggle fullscreen

Returns: boolean

GUI.ShowNotification

Shows a GUI notification
Permissions:

  • ControlGUI

Parameters:

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

Returns: string

Input

Input.Back

Goes back in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

Input.ContextMenu

Shows the context menu
Permissions:

  • Navigate

Parameters: None
Returns: string

Input.Down

Navigate down in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

Input.ExecuteAction

Execute a specific action
Permissions:

  • Navigate

Parameters:

  1. Input.Action action

Returns: string

Input.Home

Goes to home window in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

Input.Info

Shows the information dialog
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.SendText

Send a generic (unicode) text
Permissions:

  • Navigate

Parameters:

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

Returns: string

Input.ShowCodec

Show codec information of the playing item
Permissions:

  • Navigate

Parameters: None
Returns: string

Input.ShowOSD

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

  • Navigate

Parameters: None
Returns: string

Input.Up

Navigate up in GUI
Permissions:

  • Navigate

Parameters: None
Returns: string

JSONRPC

JSONRPC.GetConfiguration

Get client-specific configurations
Permissions:

  • ReadData

Parameters: None
Returns: Configuration

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

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 controlpower
  • boolean controlsystem
  • boolean controlnotify
  • boolean controlpvr
  • boolean manageaddon
  • boolean updatedata
  • boolean writefile
  • boolean executeaddon
  • boolean readdata
  • boolean controlplayback
  • boolean controlgui
  • boolean navigate
  • boolean removedata

JSONRPC.Ping

Ping responder
Permissions:

  • ReadData

Parameters: None
Returns: string

JSONRPC.SetConfiguration

Change the client-specific configuration
Permissions:

  • ControlNotify

Parameters:

  1. [ object notifications ]

Properties:

Returns: Configuration

JSONRPC.Version

Retrieve the jsonrpc protocol version
Permissions:

  • ReadData

Parameters: None
Returns: string

PVR

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:

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:

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:

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:

PVR.GetProperties

Retrieves the values of the given properties
Permissions:

  • ReadData

Parameters:

  1. PVR.Property.Name[] properties

Returns: PVR.Property.Value

PVR.Record

Toggle recording of a channel
Permissions:

  • ControlPVR

Parameters:

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

Returns: string

PVR.Scan

Starts a channel scan
Permissions:

  • ControlPVR

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

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

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. mixed to

Returns: string

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

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:

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

Returns: string

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

Player.Rotate

Rotates current picture
Permissions:

  • ControlPlayback

Parameters:

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

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

Turn partymode on or off
Permissions:

  • ControlPlayback

Parameters:

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

Returns: string

Player.SetRepeat

Set the repeat mode of the player
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. mixed repeat

Returns: string

Player.SetShuffle

Shuffle/Unshuffle items in the player
Permissions:

  • ControlPlayback

Parameters:

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

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
  3. [ boolean enable = False ]

Returns: string

Player.Stop

Stops playback
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid

Returns: string

Player.Zoom

Zoom current picture
Permissions:

  • ControlPlayback

Parameters:

  1. Player.Id playerid
  2. mixed zoom

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

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

  • ControlSystem

Parameters: None
Returns: string

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

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 ]
  4. [ mixed filter ]

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. [ Video.Fields.MusicVideo properties ]
  2. [ List.Limits limits ]
  3. [ List.Sort sort ]
  4. [ mixed filter ]

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 ]
  4. [ mixed filter ]

Returns:

Type: object
Properties:

VideoLibrary.RemoveEpisode

Removes the given episode from the library
Permissions:

  • RemoveData

Parameters:

  1. Library.Id episodeid

Returns: string

VideoLibrary.RemoveMovie

Removes the given movie from the library
Permissions:

  • RemoveData

Parameters:

  1. Library.Id movieid

Returns: string

VideoLibrary.RemoveMusicVideo

Removes the given music video from the library
Permissions:

  • RemoveData

Parameters:

  1. Library.Id musicvideoid

Returns: string

VideoLibrary.RemoveTVShow

Removes the given tv show from the library
Permissions:

  • RemoveData

Parameters:

  1. Library.Id tvshowid

Returns: string

VideoLibrary.Scan

Scans the video sources for new library items
Permissions:

  • UpdateData

Parameters:

  1. [ string directory = "" ]

Returns: string

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

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

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

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

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

Addon

Addon.Content

Type: string

Addon.Details

Extends:


Properties:

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

Addon.Fields

Extends:

Addon.Types

Type: string

Application

Application.Property.Name

Type: string

Application.Property.Value

Type: object
Properties:

  • [ string name = "" ]
  • [ integer volume = 0 ]
  • [ object version ]

Properties:

    • [ mixed revision = null ]
    • integer minor
    • string tag
    • integer major
  • [ boolean muted = False ]

Array

Array.Integer

Type: array

Array.String

Type: array

Audio

Audio.Details.Album

Extends:


Properties:

Audio.Details.Artist

Extends:


Properties:

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

Audio.Details.Base

Extends:


Properties:

Audio.Details.Media

Extends:


Properties:

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

Audio.Details.Song

Extends:


Properties:

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

Audio.Fields.Album

Extends:

Audio.Fields.Artist

Extends:

Audio.Fields.Song

Extends:

Configuration

Configuration

Type: object
Properties:

Configuration.Notifications

Type: object
Properties:

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

Files

Files.Media

Type: string

GUI

GUI.Property.Name

Type: string

GUI.Property.Value

Type: object
Properties:

  • [ object skin ]

Properties:

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

Properties:

    • string label
  • [ object currentwindow ]

Properties:

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

GUI.Window

Type: string

Global

Global.IncrementDecrement

Type: string

Global.String.NotEmpty

Type: string

Global.Time

Type: object
Properties:

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

Global.Toggle

Type: mixed

Input

Input.Action

Type: string

Item

Item.Details.Base

Type: object
Properties:

  • string label

Item.Fields.Base

Type: array

Library

Library.Details.Genre

Extends:


Properties:

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

Library.Fields.Genre

Extends:

Library.Id

Type: integer

List

List.Amount

Type: integer

List.Fields.All

Extends:

List.Fields.Files

Extends:

List.Filter.Albums

Type: mixed

List.Filter.Artists

Type: mixed

List.Filter.Episodes

Type: mixed

List.Filter.Fields.Albums

Type: string

List.Filter.Fields.Artists

Type: string

List.Filter.Fields.Episodes

Type: string

List.Filter.Fields.Movies

Type: string

List.Filter.Fields.MusicVideos

Type: string

List.Filter.Fields.Songs

Type: string

List.Filter.Fields.TVShows

Type: string

List.Filter.Movies

Type: mixed

List.Filter.MusicVideos

Type: mixed

List.Filter.Operators

Type: string

List.Filter.Rule

Type: object
Properties:

List.Filter.Rule.Albums

Extends:


Properties:

List.Filter.Rule.Artists

Extends:


Properties:

List.Filter.Rule.Episodes

Extends:


Properties:

List.Filter.Rule.Movies

Extends:


Properties:

List.Filter.Rule.MusicVideos

Extends:


Properties:

List.Filter.Rule.Songs

Extends:


Properties:

List.Filter.Rule.TVShows

Extends:


Properties:

List.Filter.Songs

Type: mixed

List.Filter.TVShows

Type: mixed

List.Item.All

Extends:


Properties:

  • [ string channel = "" ]
  • [ integer top250 = 0 ]
  • [ PVR.Channel.Type channeltype = "tv" ]
  • [ string trailer = "" ]
  • [ integer disc = 0 ]
  • [ integer track = 0 ]
  • [ string firstaired = "" ]
  • [ Library.Id albumid = -1 ]
  • [ string originaltitle = "" ]
  • [ string premiered = "" ]
  • [ string type = "unknown" ]
  • [ Array.String writer ]
  • [ Video.Cast cast ]
  • [ string mpaa = "" ]
  • [ string productioncode = "" ]
  • [ string musicbrainzartistid = "" ]
  • [ integer episode = 0 ]
  • [ Array.String country ]
  • [ string votes = "" ]
  • [ string tagline = "" ]
  • [ boolean hidden = False ]
  • [ string showtitle = "" ]
  • [ Library.Id id = -1 ]
  • [ boolean locked = False ]
  • [ string endtime = "" ]
  • [ Library.Id setid = -1 ]
  • [ integer duration = 0 ]
  • [ Array.String showlink ]
  • [ Array.String studio ]
  • [ integer channelnumber = 0 ]
  • [ string imdbnumber = "" ]
  • [ Library.Id tvshowid = -1 ]
  • [ string musicbrainztrackid = "" ]
  • [ integer watchedepisodes = 0 ]
  • [ integer season = 0 ]
  • [ Array.String albumartist ]
  • [ Array.String tag ]
  • [ string lyrics = "" ]
  • [ string starttime = "" ]
  • [ string album = "" ]
  • [ string set = "" ]
  • [ string plotoutline = "" ]
  • [ string comment = "" ]

List.Item.File

Extends:


Properties:

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

List.Items.Sources

Type: array

List.Limits

Type: object
Properties:

List.LimitsReturned

Type: object
Properties:

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

List.Sort

Type: object
Properties:

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

Media

Media.Artwork

Type: object
Properties:

Media.Details.Base

Extends:


Properties:

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

Notifications

Notifications.Item

Type: mixed

Notifications.Item.Type

Type: string

Optional

Optional.Boolean

Type: mixed

Optional.Integer

Type: mixed

Optional.Number

Type: mixed

Optional.String

Type: mixed

PVR

PVR.Channel.Type

Type: string

PVR.ChannelGroup.Id

Type: mixed

PVR.Details.Channel

Extends:


Properties:

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

PVR.Details.ChannelGroup

Extends:


Properties:

PVR.Details.ChannelGroup.Extended

Extends:


Properties:

PVR.Fields.Channel

Extends:

PVR.Property.Name

Type: string

PVR.Property.Value

Type: object
Properties:

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

Player

Player.Audio.Stream

Type: object
Properties:

  • string language
  • string name
  • integer index

Player.Audio.Stream.Extended

Extends:


Properties:

  • integer bitrate
  • string codec
  • integer channels

Player.Id

Type: integer

Player.Notifications.Data

Type: object
Properties:

Player.Notifications.Player

Type: object
Properties:

Player.Notifications.Player.Seek

Extends:


Properties:

Player.Position.Percentage

Type: number

Player.Position.Time

Type: object
Properties:

  • [ integer milliseconds = 0 ]
  • [ integer seconds = 0 ]
  • [ integer minutes = 0 ]
  • [ integer hours = 0 ]

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:

  • string language
  • string name
  • integer index

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 canshutdown = False ]
  • [ boolean cansuspend = False ]
  • [ boolean canhibernate = False ]
  • [ boolean canreboot = False ]

Video

Video.Cast

Type: array

Video.Details.Base

Extends:


Properties:

Video.Details.Episode

Extends:


Properties:

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

Video.Details.File

Extends:


Properties:

Video.Details.Item

Extends:


Properties:

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

Video.Details.Media

Extends:


Properties:

  • [ string title = "" ]

Video.Details.Movie

Extends:


Properties:

Video.Details.MovieSet

Extends:


Properties:

Video.Details.MovieSet.Extended

Extends:


Properties:

Video.Details.MusicVideo

Extends:


Properties:

Video.Details.Season

Extends:


Properties:

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

Video.Details.TVShow

Extends:


Properties:

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

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 total = 0 ]
  • [ number position = 0 ]

Video.Streams

Type: object
Properties:

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


Notifications

Application

Application.OnVolumeChanged

The volume of the application has changed.
Parameters:

  1. string sender
  2. object data

Properties:

  • integer volume
  • boolean muted

AudioLibrary

AudioLibrary.OnCleanFinished

The audio library has been cleaned.
Parameters:

  1. string sender
  2. null data

AudioLibrary.OnCleanStarted

An audio library clean operation has started.
Parameters:

  1. string sender
  2. null data

AudioLibrary.OnRemove

An audio item has been removed.
Parameters:

  1. string sender
  2. object data

Properties:

AudioLibrary.OnScanFinished

Scanning the audio library has been finished.
Parameters:

  1. string sender
  2. null data

AudioLibrary.OnScanStarted

An audio library scan has started.
Parameters:

  1. string sender
  2. null data

AudioLibrary.OnUpdate

An audio item has been updated.
Parameters:

  1. string sender
  2. object data

Properties:

Input

Input.OnInputFinished

The user has provided the requested input.
Parameters:

  1. string sender
  2. null data

Input.OnInputRequested

The user is requested to provide some information.
Parameters:

  1. string sender
  2. object data

Properties:

  • [ string title ]
  • string value
  • string type

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

A property of the playing items has changed.
Parameters:

  1. string sender
  2. object data

Properties:

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:

Playlist

Playlist.OnAdd

A playlist item has been added.
Parameters:

  1. string sender
  2. object data

Properties:

Playlist.OnClear

A playlist item has been cleared.
Parameters:

  1. string sender
  2. object data

Properties:

Playlist.OnRemove

A playlist item has been removed.
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.OnCleanFinished

The video library has been cleaned.
Parameters:

  1. string sender
  2. null data

VideoLibrary.OnCleanStarted

A video library clean operation has started.
Parameters:

  1. string sender
  2. null data

VideoLibrary.OnRemove

A video item has been removed.
Parameters:

  1. string sender
  2. object data

Properties:

VideoLibrary.OnScanFinished

Scanning the video library has been finished.
Parameters:

  1. string sender
  2. null data

VideoLibrary.OnScanStarted

A video library scan has started.
Parameters:

  1. string sender
  2. null data

VideoLibrary.OnUpdate

A video item has been updated.
Parameters:

  1. string sender
  2. object data

Properties:

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

See also

External links