Greetings,
I'm trying to make a Disney Jr plugin. I'm not sure it is that hard, but I've never made a plugin before, and I don't really know python. (facepalm)
I first copied the Disney plugin and made the necessary name changes.
With some digging around, I found the JSON files to be:
main -- http://disneyjunior.com/_grill/json
show info -- http://disneyjunior.com/_grill/json/mickey-mouse-clubhouse/video
specific video info -- http://disneyjunior.com/_grill/json/watch/donald-hatches-an-egg-4c40daff9e9f0d388e6e47bd
I've gotten my code to the point such that I can load the channel and it actually shows the various shows. The problem comes when I click on the show. At this point, the logfile shows:
2014-08-13 19:51:46,444 (109504000) : DEBUG (runtime:717) - Handling request GET /video/disneyjr 2014-08-13 19:51:46,446 (109504000) : DEBUG (runtime:814) - Found route matching /video/disneyjr 2014-08-13 19:51:46,447 (109504000) : DEBUG (base:125) - Checking if com.plexapp.plugins.disneyjr is broken 2014-08-13 19:51:46,449 (109504000) : DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X1N0b3JlU2VydmljZTpJc0NoYW5uZWxCcm9rZW4_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMQpzMjgKY29tLnBsZXhhcHAucGx1Z2lucy5kaXNuZXlqcnMxMAppZGVudGlmaWVycjAK' 2014-08-13 19:51:46,458 (109504000) : DEBUG (runtime:106) - Sending packed state data (109 bytes) 2014-08-13 19:51:46,458 (109504000) : DEBUG (runtime:918) - Response: [200] MediaContainer, 430 bytes 2014-08-13 19:51:46,484 (109504000) : DEBUG (runtime:717) - Handling request GET /video/disneyjr/videos?url=%2Fmickey-mouse-clubhouse%2Fvideo&thumb=http%3A%2F%2Fcdnvideo.dolimg.com%2Fcdn_assets%2F5ebf00516ff6cdfba3b3269500386b8e8d499b55.jpg&title=Watch+Mickey+Mouse+Clubhouse+Videos%21 2014-08-13 19:51:46,487 (109504000) : DEBUG (runtime:814) - Found route matching /video/disneyjr/videos 2014-08-13 19:51:46,487 (109504000) : DEBUG (networking:172) - Requesting 'http://disneyjunior.com/_grill/json//mickey-mouse-clubhouse/video' 2014-08-13 19:51:46,657 (109504000) : DEBUG (services:602) - No service found for URL 'http://disneyjunior.com/watch/donald-hatches-an-egg-4c40daff9e9f0d388e6e47bd' 2014-08-13 19:51:46,657 (109504000) : DEBUG (services:617) - No matching services found for 'http://disneyjunior.com/watch/donald-hatches-an-egg-4c40daff9e9f0d388e6e47bd' 2014-08-13 19:51:46,660 (109504000) : DEBUG (services:602) - No service found for URL 'http://disneyjunior.com/watch/donald-hatches-an-egg-4c40daff9e9f0d388e6e47bd' 2014-08-13 19:51:46,660 (109504000) : CRITICAL (runtime:964) - Exception when constructing response (most recent call last): File "/Users/ob1/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 945, in construct_response el = result._to_xml() File "/Users/ob1/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/objectkit.py", line 659, in _to_xml el = Framework.modelling.objects.ModelInterfaceObjectContainer._to_xml(self) File "/Users/ob1/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/modelling/objects.py", line 382, in _to_xml root = Container._to_xml(self) File "/Users/ob1/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/modelling/objects.py", line 139, in _to_xml self._append_children(root, self._objects) File "/Users/ob1/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/modelling/objects.py", line 145, in _append_children el = obj._to_xml() File "/Users/ob1/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/objectkit.py", line 572, in _to_xml if self._core.services.function_in_service_is_deferred(Framework.components.services.MEDIA_OBJECTS_FUNCTION_NAME, service): File "/Users/ob1/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/services.py", line 556, in function_in_service_is_deferred service.sandbox.context.import_values(values) AttributeError: 'NoneType' object has no attribute 'sandbox'
The main lines in the logfile that I'm wondering about in this long-winded question are these:
2014-08-13 19:51:46,657 (109504000) : DEBUG (services:602) - No service found for URL 'http://disneyjunior.com/watch/donald-hatches-an-egg-4c40daff9e9f0d388e6e47bd'
2014-08-13 19:51:46,657 (109504000) : DEBUG (services:617) - No matching services found for 'http://disneyjunior.com/watch/donald-hatches-an-egg-4c40daff9e9f0d388e6e47bd'
The reason this is perplexing, is that if I go to the url in question (http://disneyjunior.com/watch/donald-hatches-an-egg-4c40daff9e9f0d388e6e47bd) and click on the "Plex It!" button, it works which tells me that somewhere there IS a service that can match that URL.
Any thoughts on how I can just use that service? Or am I waaay off base?
Thanks