JSON запросы в KODI

В этом посте буду выкладывать JSON запросы.
Префикс для запросов http://IP_KODI/jsonrpc?request=
— Получаем инфо о текущем канале PVR(На видео пока не проверял)
{jsonrpc:2.0,id:3,method:Player.GetItem,params:{playerid:1,properties:[album,albumartist,artist,director,episode,fanart,file,genre,plot,rating,season,showtitle,studio,imdbnumber,tagline,thumbnail,title,track,writer,year,streamdetails,originaltitle,cast,playcount]}}

— Получаем инфо о воспроизводимом файле
{"jsonrpc":"2.0","id":2,"method":"Player.GetProperties","params":{"playerid":1,"properties":["audiostreams","canseek","currentaudiostream","currentsubtitle","partymode","playlistid","position","repeat","shuffled","speed","subtitleenabled","subtitles","time","totaltime","type"]}}
— узнаем уровень громкости
{"jsonrpc":"2.0","id":1,"method":"Application.GetProperties","params":{"properties":["volume","muted"]}}
— Получить список видеофайлов из библиотеки
{"jsonrpc":"2.0","id":1,"method":"VideoLibrary.GetMovieSets","params":{"properties":["thumbnail","title","fanart","playcount"],"limits":{"start":0,"end":500}}}
— Получить полную инфу из видеобиблиотеки
{"jsonrpc":"2.0","id":1,"method":"VideoLibrary.GetMovies","params":{"properties":["director","genre","plot","rating","runtime","sorttitle","studio","title","trailer","playcount","originaltitle","tagline","imdbnumber","year","set","setid","dateadded","top250","file","thumbnail","resume","streamdetails","country","tag","mpaa","fanart","cast","votes","writer"],"limits":{"start":0,"end":500}}}
— Получить список каналов IPTV
{"jsonrpc":"2.0","id":1,"method":"PVR.GetChannels","params":{"channelgroupid":"alltv","properties":["channel","channeltype","hidden","lastplayed","locked","thumbnail","broadcastnow"]}}
— Получить список радиоканалов IPTV
{"jsonrpc":"2.0","id":1,"method":"PVR.GetChannels","params":{"channelgroupid":"allradio","properties":["channel","channeltype","hidden","lastplayed","locked","thumbnail","broadcastnow"]}}
— Инфа о текущем воспроизведении
{"jsonrpc":"2.0","id":2,"method":"Player.GetProperties","params":{"playerid":0,"properties":["audiostreams","canseek","currentaudiostream","currentsubtitle","partymode","playlistid","position","repeat","shuffled","speed","subtitleenabled","subtitles","time","totaltime","type"]}}
— Получить текущий плейлист АУДИО
{"jsonrpc":"2.0","id":1,"method":"Playlist.GetItems","params":{"playlistid":0,"properties":["title","thumbnail","fanart","rating","genre","artist","track","season","episode","year","duration","album","showtitle","playcount","file"],"limits":{"start":0,"end":750}}}
— воспроизведение в случайном порядке
{"jsonrpc":"2.0","id":1,"method":"Player.SetShuffle","params":{"playerid":0,"shuffle":true}}
— повтор воспроизведения
{"jsonrpc":"2.0","id":1,"method":"Player.SetRepeat","params":{"playerid":0,"repeat":"all"}}
{"jsonrpc":"2.0","id":1,"method":"Player.SetRepeat","params":{"playerid":0,"repeat":"off"}}
{"jsonrpc":"2.0","id":1,"method":"Player.SetRepeat","params":{"playerid":0,"repeat":"one"}}
— рейтинг
{"jsonrpc":"2.0","id":1,"method":"AudioLibrary.SetSongDetails","params":{"songid":-1,"rating":5}}
— PLAY\PAUSE
{"jsonrpc":"2.0","id":1,"method":"Player.PlayPause","params":{"playerid":0}}
Гибернация (Проверял на винде)
{"jsonrpc":"2.0","id":1,"method":"System.Hibernate"}

  • Активировать окно:

{"jsonrpc":"2.0","id":1,"method":"GUI.ActivateWindow","params":{"window":"home"}}

Отправить ответ

avatar