JSON RPC: Important changes
#3
Sunday, September 18th 2011:
Commits: c4f161e177f5e079f2ba and 525833acf0b7fa3a9404
OK these two commits (especially the first one) are a huge step in the current jsonrpc API because they completely refactor the handling of players and playlists. First of all there will be no seperate VideoPlayer, AudioPlayer and PicturePlayer anymore but only one Player namespace. The same goes for VideoPlaylist and AudioPlaylist which has been replaced by a refactored Playlist namespace which even offers limited support for picture playlists (aka slideshows). Furthermore a lot of methods have been merged/refactored/moved. From now on the Playlist namespace simply represents a playlist (i.e. a sorted list of playable items) and does not provide any playback controlling functionalities anymore. Those have all been moved into the Player namespace because the players are responsible for playing items and not the playlists. I'm sure there will be quite a few questions about these changes so don't hesitate to post them in the development thread. Here is a more or less complete list of all important changes:
  • Merged AudioPlayer, VideoPlayer and PicturePlayer into Player
  • Merged AudioPlaylist and VideoPlaylist to replace Playlist and provide initial support for picture playlists (aka slideshows)
  • Players/Playlists are no longer accessed by their media type (video, audio, picture) but by a unique ID. Active players/playlists (their ID and media type) can still be retrieved using Player.GetActivePlayers/Playlist.GetPlaylists
  • Replaced Playlist.State with Playlist.GetProperties
  • Replaced Player.State, Player.GetTime and Player.GetPercentage with Player.GetProperties
  • Removed Playlist.SkipPrevious and Playlist.SkipNext (use Player.GoPrevious and Player.GoNext instead)
  • The following methods have been moved from the Playlist to the Player namespace: Play (renamed to Open), Shuffle, UnShuffle, Repeat
  • Refactored notifications for the Player namespace
  • Unified naming of position/item/index parameters in Player and Playlist namespaces
  • Merged XBMC.Play and XBMC.StartSlideshow into Player.Open
  • Make Playlist.Add, Playlist.Clear and Player.Open work for picture playlists
  • Replace Rewind and Forward with SetSpeed in Player namespace
  • Replace "value" parameter in "Player.SeekTime" with time struct parameters
  • Merge SeekTime, SeekPercentage and (Small|Big)Skip(Forward|Backward) into Seek in Player namespace
  • Add Player.SetAudioStream, Player.SetSubtitle and the properties "currentaudiostream", "audiostreams", "subtitleenabled", "currentsubtitle" and "subtitles" to Player.GetProperties

Tuesday, September 20th 2011:
Commits: 5abc022c3a353e206f78, a03c34b37ae64637a9fd, 2a848458dbfd36d87058, 481a6007e899bdba21f2
  • Added "name" and "version" to Application.GetProperties
  • Fixed value of "file" field for videos
  • Renamed "label" field for albums to "albumlabel" for consistency with the name of the returned property
  • Renamed "fields" parameters to "properties" parameters

Wednesday, October 5th 2011:
Commit: 288f4967d954769282fc
  • Added GetItem to the Player namespace to retrieve the currently playing item (also works for items played with Player.Open or from recently added script)

Saturday, October 8th 2011:
Commits: 845288d417d40dea22f6, c2d1e992fdd64f380d67, 6c9af5c7c0ae8075c0f8, c00ff2defb35333206f2, 253dd7e808d1e7a83682
  • renamed "value" parameter of Application.Setvolume to "volume"
  • refactored Application.ToggleMute into Application.SetMute which takes the following parameters: true, false, "toggle"
  • removed optional parameter "albums" from AudioLibrary.GetRecentlyAddedAlbums (use the "limits" parameter to limit the number of returned items (maximum is 25))
  • renamed parameter "albums" from AudioLibrary.GetRecentlyAddedSongs to "albumlimit"
  • refactored (Audio|Video)Library.Export parameters using union types to better distinguish between single and multi file export

Friday, October 14th 2011:
Commit: 53ee2724ede510a8a3a0
  • Refactored Files.Download into Files.PrepareDownload and Files.Download. Using jsonrpc over HTTP Files.PrepareDownload does, what Files.Download did until now. It provides a URL which can be called to download the file (beware the answer format has changed). The idea behind the changes is that some transport layers will support direct download through Files.Download while others (like HTTP) will not and in that case the method name "Download" may be confusing. That's why we split the functionality into Files.PrepareDownload (which will be available over HTTP) and Files.Download (which will not be available over HTTP because it's not supported).
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.


Messages In This Thread
JSON RPC: Important changes - by Montellese - 2011-04-05, 00:52
RE: JSON RPC: Important changes - by Montellese - 2011-09-18, 23:10
Logout Mark Read Team Forum Stats Members Help
JSON RPC: Important changes1