stekel / kodi
Library for interacting with a kodi instance
Installs: 118
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/stekel/kodi
Requires
- php: ~5.6|~7.0
- guzzlehttp/guzzle: ~6.0
- illuminate/support: ~5
Requires (Dev)
- phpunit/phpunit: >=5.4.3
This package is auto-updated.
Last update: 2025-09-26 23:35:48 UTC
README
This package provides a simple api for interacting with a running Kodi instance using the Kodi jsonrpc api.
Install
Via Composer
$ composer require stekel/kodi
Usage
Laravel
use Kodi; Kodi::player()->playPause(); // Play/Pause the currently playing media
Manual
use stekel\Kodi\Kodi $kodi = Kodi::connect('192.168.1.100', '8080', 'xbmc', 'xbmc'); $kodi->player()->playPause(); // Play/Pause the currently playing media
Supported Functions
Add-ons
Function | Execution |
---|---|
Addons.GetAddons | $kodi->addons()->getAddons(); |
Addons.ExecuteAddon : script.playrandomvideos | $kodi->addons()->playRandom($model) $model can be a TvShow or Song |
Gui
Function | Execution |
---|---|
GUI.ShowNotification | $kodi->gui()->showNotification($title, $message); |
Player
Function | Execution |
---|---|
Player.GetActivePlayers | $kodi->player()->getActivePlayers(); |
Player.Open | $kodi->player()->open($model); $model can be an Episode or Song |
Player.PlayPause | $kodi->player()->playPause(); |
Player.Stop | $kodi->player()->stop(); |
Player.GetItem | $kodi->player()->getItem(); Returns either an Episode or Song |
Video Library
Function | Execution |
---|---|
VideoLibrary.GetTVShows | $kodi->videoLibrary()->getTvShows(); |
VideoLibrary.GetTVShowDetails | $kodi->videoLibrary()->getTVShowDetails(TvShow $tvshow); |
VideoLibrary.GetEpisodes | $kodi->videoLibrary()->getEpisodes($tvShowId); |
VideoLibrary.GetRecentlyAddedEpisodes | $kodi->videoLibrary()->recentlyAddedEpisodes($limit=3); |
VideoLibrary.Clean | $kodi->videoLibrary()->clean(); |