Open bdickason opened 11 years ago
try this
{"jsonrpc": "2.0", "method": "Player.Open", "params":{"item" :{ "file" : "plugin://plugin.video.hulu/?url=\"http%3A%2F%2Fhulu.com%2Fwatch%2F534482\"&mode=\"TV_play\"" }}, "id" :1}
or
{"jsonrpc": "2.0", "method": "Player.Open", "params":{"item" :{ "file" : "plugin://plugin.video.hulu/?url=\"60267784\"&mode=\"TV_play\"&videoid=\"534482\"" }}, "id" :1}
Thanks, I'll give that a shot tonight!
First of all, great plugin!
I'm trying to access the plugin via the JSON RPC API so I can trigger videos remotely.
I've tried various configurations of the url/video_id/mode parameters but have not had much luck.
Here's an example call: [connection:send] {"method":"Player.Open","params":{"item":{"file":"plugin://plugin.video.hulu/?url=http://www.hulu.com/watch/490179&video_id=490179&mode=Select_TV_play"},"options":{}},"id":"__id2","jsonrpc":"2.0"}
Could you please advise what parameters I should be passing? I'm having trouble debugging the plugin actively, and the errors coming out of xbmc.log are not very helpful: 23:27:53 T:132665344 DEBUG: JSONRPC: Incoming request: {"method":"Player.Open","params":{"item":{"file":"plugin://plugin.video.hulu/?video_id=490179&mode=TV_play"},"options":{}},"id":"id2","jsonrpc":"2.0"} 23:27:53 T:132665344 DEBUG: JSONRPC: Calling player.open 23:27:53 T:127627264 DEBUG: CAnnouncementManager - Announcement: OnClear from xbmc 23:27:53 T:127627264 DEBUG: GOT ANNOUNCEMENT, type: 2, from xbmc, message OnClear 23:27:53 T:127627264 DEBUG: StartScript - calling plugin Hulu('plugin://plugin.video.hulu/','26','?video_id=490179&mode=TV_play') 23:27:53 T:127627264 INFO: initializing python engine. 23:27:53 T:127627264 DEBUG: new python thread created. id=32 23:27:53 T:143613952 DEBUG: Python thread: start processing 23:27:53 T:143613952 NOTICE: -->Python Interpreter Initialized<-- 23:27:53 T:143613952 DEBUG: Process - The source file to load is /var/mobile/Library/Preferences/XBMC/addons/plugin.video.hulu/default.py 23:27:53 T:143613952 DEBUG: Process - Setting the Python path to /var/mobile/Library/Preferences/XBMC/addons/plugin.video.hulu:/var/mobile/Library/Preferences/XBMC/addons/script.module.cryptopy/lib:/var/mobile/Library/Preferences/XBMC/addons/script.module.demjson/lib:/private/var/stash/Applications/XBMC.frappliance/XBMCData/XBMCHome/addons/weather.wunderground/resources/lib/wunderground:/private/var/stash/Applications/XBMC.frappliance/XBMCData/XBMCHome/addons/script.module.simplejson/lib:/var/mobile/Library/Preferences/XBMC/addons/script.module.beautifulsoup/lib:/private/var/stash/Applications/XBMC.frappliance/XBMCData/XBMCHome/addons/script.module.pil/lib:/var/mobile/Library/Preferences/XBMC/addons/script.common.plugin.cache/lib:/var/mobile/Library/Preferences/XBMC/addons/script.module.simple.downloader/lib:/var/mobile/Library/Preferences/XBMC/addons/script.module.mechanize/lib:/var/mobile/Library/Preferences/XBMC/addons/script.module.parsedom/lib:/var/mobile/Library/Preferences/XBMC/addons/script.module.elementtree/lib:/private/var/stash/Applications/XBMC.frappliance/XBMCData/XBMCHome/addons/script.module.pysqlite/lib:/var/stash/Applications/XBMC.frappliance/Frameworks:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python26.zip:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/plat-darwin:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/plat-mac:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/plat-mac/lib-scriptpackages:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/lib-tk:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/lib-old:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/lib-dynload:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/site-packages: 23:27:53 T:143613952 DEBUG: Process - Entering source directory /var/mobile/Library/Preferences/XBMC/addons/plugin.video.hulu 23:27:53 T:143613952 DEBUG: Instantiating addon using automatically obtained id of "plugin.video.hulu" dependent on version 1.0 of the xbmc.python api 23:27:53 T:127627264 DEBUG: WaitOnScriptResult - waiting on the Hulu (id=32) plugin... 23:27:54 T:143613952 ERROR: /var/mobile/Library/Preferences/XBMC/addons/script.module.cryptopy/lib/crypto/hash/sha1Hash.py:9: DeprecationWarning: the sha module is deprecated; use the hashlib module instead import sha 23:27:54 T:143613952 ERROR: /var/mobile/Library/Preferences/XBMC/addons/script.module.cryptopy/lib/crypto/hash/md5Hash.py:5: DeprecationWarning: the md5 module is deprecated; use hashlib instead import md5 23:27:54 T:127627264 DEBUG: ------ Window Init (DialogKaiToast.xml) ------ 23:27:55 T:143613952 INFO: Python script stopped 23:27:55 T:127627264 DEBUG: WaitOnScriptResult - plugin exited prematurely - terminating 23:27:55 T:132665344 DEBUG: JSONRPC: Incoming request: {"method":"Player.GetActivePlayers","params":{},"id":"id1","jsonrpc":"2.0"} 23:27:55 T:132665344 DEBUG: JSONRPC: Calling player.getactiveplayers 23:27:55 T:127627264 DEBUG: waiting for python thread 32 (/var/mobile/Library/Preferences/XBMC/addons/plugin.video.hulu/default.py) to stop 23:27:55 T:127627264 DEBUG: python thread 32 (/var/mobile/Library/Preferences/XBMC/addons/plugin.video.hulu/default.py) destructed 23:28:00 T:127627264 DEBUG: ------ Window Deinit (DialogKaiToast.xml) ------