Archive:XBMC v12 (Frodo) API changes: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Martijn
No edit summary
(24 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{DevsHeader|'''XBMC Frodo API changes'''}}
{{mininav|[[Releases]]{{l2|[[Development]]}}}}


Frodo will represent the second repository update. Any add-ons that are submitted for inclusion in Frodo-pre and Frodo will require compatibility with the new APIs.
{{see also|JSON-RPC API|Gotham API changes|Eden API changes}}


The Frodo-pre repository will be created soon, while the APIs may still change somewhat. When the APIs are frozen, the final Frodo repository will open and final API compatibility will be enforced.
== Frodo changelog ==
{{see also|XBMC v12 (Frodo) changelog}}


Be sure to read the [[Official add-on repository#Repository guidelines|Official Repository Guidlines]] before submitting a pull request.
== Addons ==


==Frodo changelog==
Frodo will represent the second repository update. Any add-ons that are submitted for inclusion in Frodo will require compatibility with the new APIs.
{{see also|XBMC v12 (Frodo) changelog}}


== Scripts and Plugins ==
Be sure to read the [[Official add-on repository#Repository guidelines|Official Repository Guidlines]] before submitting a pull request.
For a long time we have been using a major.minor.build version scheme for all addons.
The only exception until now have been our internal addons.


Over the past weeks we have made changes to make sure all of our internal addons
For a long time XBMC has been using a major.minor.build (x.y.z) version scheme for all addons. The only exception have been XBMC's internal addons.
comply with this x.y.z version scheme as well.


If you are going to submit your addon to the Frodo addon repo
With Frodo it was ensured that all of internal XBMC addons comply with this x.y.z version scheme as well.
and your addon depends on any of internal xbmc addons,
please make sure you depend on a x.y.z version.


Note: if your addon is affected by the above, it's no longer possible to submit
If you are going to submit your addon to the Frodo addon repo and your addon depends on any of internal xbmc addons, please make sure you depend on a x.y.z version.  
the exact same addon for inclusion in both Eden and Frodo repos.
The version numbers in addon.xml will have to differ.


Note: if your addon is affected by the above, it's no longer possible to submit the exact same addon for inclusion in both Eden and Frodo repos. The version numbers in addon.xml will have to differ.


The current versions for Frodo are as listed below:
The current versions for Frodo are as listed below:
*xbmc.addon : 12.0.0
* xbmc.addon : 12.0.0
*xbmc.core : 0.1.0
* xbmc.core : 0.1.0
*xbmc.gui : 4.0.0
* xbmc.gui : 4.0.0
*xbmc.json : 6.0.0
* xbmc.json : 6.0.0
*xbmc.metadata : 2.1.0
* xbmc.metadata : 2.1.0
*xbmc.python : 2.1.0
* xbmc.python : 2.1.0


 
you don't have to make any changes to your addon for the eden repo, but you need a separate version for the frodo repo that uses python 2.1.0
you don't have to make any changes to your addon for the eden repo,
but you need a separate version for the frodo repo that uses python 2.0.0


for frodo use:
for frodo use:
<source lang="xml">
<syntaxhighlight lang=xml enclose="div">
<import addon="xbmc.python" version="2.1.0"/>
<import addon="xbmc.python" version="2.1.0"/>
</source>
</syntaxhighlight>


{{tip|See [[Official_add-on_repository]]}}
{{tip|See [[Official add-on repository]]}}


== Skins ==
== Skins ==
* ?
* Same repo rules as for scripts
* Full change log see http://forum.kodi.tv/showthread.php?tid=126502
 
{{tip|See [[Official add-on repository]]}}


== JSON-RPC ==
== JSON-RPC ==
{{main|JSON-RPC API/v5}}
{{main|JSON-RPC API}}
=== API ===
=== API ===
==== Changed Methods ====
==== Changed Methods ====
Line 165: Line 160:


=== Miscellaneous ===
=== Miscellaneous ===
* [[JSON-RPC_API#WebSocket|WebSocket]] transport
* [[JSON-RPC API#WebSocket|WebSocket]] transport


== Webserver ==
== Webserver ==
Line 181: Line 176:


==== HTTP GET ====
==== HTTP GET ====
When calling the /jsonrpc handler the whole JSON-RPC Introspect in form of a [[JSON-RPC_API#Documentation|JSON schema description]] will be returned.
When calling the /jsonrpc handler the whole JSON-RPC Introspect in form of a [[JSON-RPC API#Documentation|JSON schema description]] will be returned.


=== Virtual FileSystem Handler /vfs ===
=== Virtual FileSystem Handler /vfs ===
Line 192: Line 187:
Python screensavers are now available. Scripts can extend the <tt>xbmc.ui.screensaver</tt> extension point and will be run when XBMC goes idle. If the screensaver also extends <tt>xbmc.python.script</tt>, it will show up in the Programs window and can be run as a regular script as well.
Python screensavers are now available. Scripts can extend the <tt>xbmc.ui.screensaver</tt> extension point and will be run when XBMC goes idle. If the screensaver also extends <tt>xbmc.python.script</tt>, it will show up in the Programs window and can be run as a regular script as well.


== See also ==
= References =
*[[Eden API changes]]
<references/>
*[[JSON-RPC API/v5]]


[[Category:Development]]
[[Category:Development]]
[[Category:Add-on development]]
[[Category:Frodo|*]]
[[Category:Frodo|*]]

Revision as of 12:32, 10 July 2018

Home icon grey.png   ▶ Releases
▶ Development
▶ XBMC v12 (Frodo) API changes

Frodo changelog

Addons

Frodo will represent the second repository update. Any add-ons that are submitted for inclusion in Frodo will require compatibility with the new APIs.

Be sure to read the Official Repository Guidlines before submitting a pull request.

For a long time XBMC has been using a major.minor.build (x.y.z) version scheme for all addons. The only exception have been XBMC's internal addons.

With Frodo it was ensured that all of internal XBMC addons comply with this x.y.z version scheme as well.

If you are going to submit your addon to the Frodo addon repo and your addon depends on any of internal xbmc addons, please make sure you depend on a x.y.z version.

Note: if your addon is affected by the above, it's no longer possible to submit the exact same addon for inclusion in both Eden and Frodo repos. The version numbers in addon.xml will have to differ.

The current versions for Frodo are as listed below:

  • xbmc.addon : 12.0.0
  • xbmc.core : 0.1.0
  • xbmc.gui : 4.0.0
  • xbmc.json : 6.0.0
  • xbmc.metadata : 2.1.0
  • xbmc.python : 2.1.0

you don't have to make any changes to your addon for the eden repo, but you need a separate version for the frodo repo that uses python 2.1.0

for frodo use:

<import addon="xbmc.python" version="2.1.0"/>
Tip Tip: See Official add-on repository

Skins

Tip Tip: See Official add-on repository

JSON-RPC

API

Changed Methods

  • General / Global
    • albums: added properties "playcount", "genreid", "artistid" and "displayartist"
    • filter: a new parameter "filter" has been added which can either take a certain property (e.g. "genre", "actor", "studio", ...) and a value to filter by or a complex rule-based filter
    • movies
      • properties "set" and "setid" are no longer arrays but a single string/integer
      • properties like "country", "director" etc are no longer returned as concatenated strings but as arrays of strings
      • properties "productioncode" and "premiered" have been removed
      • added property "tag"
    • musicvideos: added property "tag"
    • songs: added properties "lastplayed", "genreid", "artistid", "albumartistid" and "displayartist"
    • sort: cleaned up sort methods and added a few new ones (e.g. "dateadded")
    • tvshows: added properties "lastplayed" and "tag"
    • videos: changed property "runtime" from a string to an integer (in seconds)
  • Application
    • SetVolume: added support for "increment" and "decrement"
  • Files
    • GetDirectory: added properties "size", "lastmodified", "mimetype"
  • Player
    • GoNext: merged into GoTo
    • GoPrevious: merged into GoTo
    • MoveDown: merged into Move
    • MoveLeft: merged into Move
    • MoveRight: merged into Move
    • MoveUp: merged into Move
    • Open:
      • added optional "options" parameter which can have the properties "shuffled", "repeat" and "resume"
      • added "partymode" property to be able to start the music/video partymode or a specific smartplaylist in partymode
      • added "channelid" property to be able to start a PVR channel
    • PlayPause: added optional "play" parameter
    • Repeat: renamed to SetRepeat
    • SetSubtitle: added optional "enable" parameter
    • Shuffle: merged into SetShuffle
    • UnShuffle: merged into SetShuffle
    • ZoomIn: merged into Zoom
    • ZoomOut: merged into Zoom
  • VideoLibrary
    • GetTVShows: added properties "season", "watchedepisodes"
    • GetSeasons: added property "watchedepisodes"

New Methods

  • Addons
    • ExecuteAddon
    • GetAddons
    • GetAddonDetails
    • SetAddonEnabled
  • AudioLibrary
    • GetRecentlyPlayedAlbums
    • GetRecentlyPlayedSongs
    • SetAlbumDetails
    • SetArtistDetails
    • SetSongDetails
  • Files
    • GetFileDetails
  • GUI
    • ActivateWindow
    • GetProperties
    • SetFullscreen
    • ShowNotification
  • Input
    • ContextMenu
    • ExecuteAction
    • Info
    • SendText
    • ShowCodec
    • ShowOSD
  • Player
    • Move
    • SetPartymode
    • SetRepeat
    • SetShuffle
    • Zoom
  • PVR
    • GetChannelGroups
    • GetChannelGroupDetails
    • GetChannels
    • GetChannelDetails
    • GetProperties
    • Record
    • Scan
  • System
    • EjectOpticalDrive
  • VideoLibrary
    • RemoveEpisode
    • RemoveMovie
    • RemoteMusicVideo
    • RemoveTVShow
    • SetEpisodeDetails
    • SetMovieDetails
    • SetMusicVideoDetails
    • SetTVShowDetails

New Notifications

  • Application
    • OnVolumeChanged
  • AudioLibrary
    • OnCleanStarted
    • OnCleanFinished
    • OnScanStarted
    • OnScanFinished
  • Input
    • OnInputRequested
    • OnInputFinished
  • Playlist
    • OnAdd
    • OnRemove
    • OnClear
  • VideoLibrary
    • OnCleanStarted
    • OnCleanFinished
    • OnScanStarted
    • OnScanFinished

Miscellaneous

Webserver

General

The webserver has been improved to use a thread pool of four threads instead of using a single thread to handle incoming requests.

Image Handler /image

A new /image handler to provide access to cached images (thumbnails, fanart, ...) of media items has been added to replace the existing /vfs handler. The image URL (image://) returned by JSON-RPC needs to be URL encoded before appending it like a path to

http://<your-ip>:<configured port>/image/<url-encoded image:// path>

JSON-RPC Handler /jsonrpc

HTTP POST

When sending HTTP POST requests to the /jsonrpc handler the client MUST specify the HTTP header

Content-Type: application/json

HTTP GET

When calling the /jsonrpc handler the whole JSON-RPC Introspect in form of a JSON schema description will be returned.

Virtual FileSystem Handler /vfs

In an effort to make the /vfs handler more secure (in Eden and before it allowed access to literally any file on the local hard disc and on network shares accessible to XBMC) the access has been limited to files within directories that have been specified by the user as sources (video, music, files, programs) in XBMC.

Scrapers

  • ?

Screensavers and visualizations

Python screensavers are now available. Scripts can extend the xbmc.ui.screensaver extension point and will be run when XBMC goes idle. If the screensaver also extends xbmc.python.script, it will show up in the Programs window and can be run as a regular script as well.

References