Last active
September 29, 2019 21:30
-
-
Save jrwren/9abe22b4761dc854a66e to your computer and use it in GitHub Desktop.
curl to kodi examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# drawingroom is a DNS entry to the IP of my KODI | |
curl -D - -H 'Content-Type: application/json' -d '{"jsonrpc": "2.0", "method": "Player.GetActivePlayers", "id": 1}' drawingroom/jsonrpc | |
curl -D - -H 'Content-Type: application/json' -d '{"jsonrpc": "2.0", "method": "Player.GetItem", "params": { "properties": ["title", "album", "artist", "season", "episode", "duration", "showtitle", "tvshowid", "thumbnail", "file", "fanart", "streamdetails"], "playerid": 1}, "id": "VideoGetItem"}' drawingroom/jsonrpc | |
# play a url - these don't actually work. | |
curl --header 'Content-Type: application/json' --data-binary '{ "id": 1, "jsonrpc": "2.0", "method": "Player.Open", "params": {"item": { "file": "http://usher.justin.tv/api/channel/hls/nathanias.m3u8?allow_source=true&token=%7B%22user_id%22%3A20783272%2C%22channel%22%3A%22nathanias%22%2C%22expires%22%3A1452203636%2C%22chansub%22%3A%7B%22view_until%22%3A1924905600%2C%22restricted_bitrates%22%3A%5B%5D%7D%2C%22private%22%3A%7B%22allowed_to_view%22%3Atrue%7D%2C%22privileged%22%3Afalse%2C%22source_restricted%22%3Afalse%7D&sig=73644f1a71652955bf189590ee0f29479847f644" } } }' 'drawingroom/jsonrpc' | |
# or | |
curl --header 'Content-Type: application/json' --data-binary '{ "id": 1, "jsonrpc": "2.0", "method": "Player.Open", "params": {"item": { "file": "https://r19---sn-vgqsenld.googlevideo.com/videoplayback?dur=1031.333&clen=9147457&expire=1452227601&sver=3&fexp=9407610%2C9416126%2C9418400%2C9420452%2C9422596%2C9423241%2C9423282%2C9423662%2C9423821%2C9424861%2C9425232%2C9425619&nh=IgpwZjAxLm9yZDM1Kg0yMDAxOjU1OTo6Mzc5&key=yt6&mime=video%2Fmp4&pl=26&itag=135&mn=sn-vgqsenld&mm=31&ip=2601%3A400%3A8000%3A341a%3A483b%3A29dd%3A1f58%3A17f&gir=yes&id=o-AKzxNbeLz16EdgYMe5ZJnw0NLfqDvY6tjoB8s2oJK-mL&signature=59941F7917D71085156C0A7DCC448A5C9C014D3B.78C54270CED50711959C74CB27C473E461AC0F78&ms=au&upn=RN8eVWYx2fg&mv=m&mt=1452205923&ipbits=0&lmt=1442809845231977&sparams=clen%2Cdur%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cnh%2Cpl%2Crequiressl%2Csource%2Cupn%2Cexpire&requiressl=yes&keepalive=yes&initcwndbps=681250&source=youtube&cpn=bKfiWd8vwF0vvFbD&alr=yes&ratebypass=yes&c=WEB&cver=html5&range=1053638-2648870&rn=11&rbuf=47193" } } }' 'drawingroom/jsonrpc' | |
# or a file on my home lan | |
curl --header 'Content-T{ "id": 1, "jsonrpc": "2.0", "method": "Player.Open", "params": {"item": { "file": "http://delays.powerpuff/~jrwren/2003.mp4" } } }' 'drawingroom/jsonrpc' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment