New URL service and Plexit

Hello, I'm trying to develop a new URL service.  I've written the basics according to this article.  I've run the test URL lookup and I get this:

[root@plex ~]# curl http://localhost:32400/system/services/url/lookup?url=http%3A%2F%2Fwww.movietubenow.com%2Fwatch.php%3Fv%3D7383BeysLr0
<?xml version='1.0' encoding='utf-8'?>

  
    
      
        
        
      
    
  

So this test passes. Furthermore, the logs say this:

2014-10-05 16:11:11,097 (7f89bf63b700) :  DEBUG (runtime:717) - Handling request GET /system/services/url/lookup?url=http%3A%2F%2Fwww.movietubenow.com%2Fwatch.php%3Fv%3D7383BeysLr0
2014-10-05 16:11:11,099 (7f89bf63b700) :  DEBUG (runtime:814) - Found route matching /system/services/url/lookup
2014-10-05 16:11:11,100 (7f89bf63b700) :  DEBUG (services:23) - Looking up URL 'http://www.movietubenow.com/watch.php?v=7383BeysLr0'
2014-10-05 16:11:11,101 (7f89bf63b700) :  DEBUG (services:615) - Found a service matching 'http://www.movietubenow.com/watch.php?v=7383BeysLr0' - MovieTube (com.plexapp.plugins.movietube)
2014-10-05 16:11:11,102 (7f89bf63b700) :  DEBUG (services:39) - Reloading service code for MovieTube (URLServiceRecord)
2014-10-05 16:11:11,118 (7f89bf63b700) :  DEBUG (services:615) - Found a service matching 'http://www.movietubenow.com/watch.php?v=7383BeysLr0' - MovieTube (com.plexapp.plugins.movietube)
2014-10-05 16:11:11,120 (7f89bf63b700) :  DEBUG (networking:172) - Requesting 'http://www.movietubenow.com/watch.php?v=7383BeysLr0'
2014-10-05 16:11:11,917 (7f89bf63b700) :  DEBUG (services:30) - TAG: Object
2014-10-05 16:11:11,919 (7f89bf63b700) :  DEBUG (services:615) - Found a service matching 'http://www.movietubenow.com/watch.php?v=7383BeysLr0' - MovieTube (com.plexapp.plugins.movietube)
2014-10-05 16:11:11,922 (7f89bf63b700) :  DEBUG (runtime:918) - Response: [200] MediaContainer, 1986 bytes

I think all looks good.  But when I try and add the same URL using my PlexIt bookmarklet, nothing is recognized.  Everything else works right- adding YouTube, Vimeo, etc.  I'm not sure why my new plugin isn't getting triggered.  Where can I go to see what's happening?

Seeing this on Javascript console.

# var s=document.createElement("script");s.type="text/javascript";s.src="//plex.tv/queue/bookmarklet_payload";var h=document.getElementsByTagName("head")[0];h.appendChild(s);void(0);

undefined
url: http://www.movietubenow.com/watch.php?v=7383BeysLr0 plexit-frame-a5112b9b34b8baebc56f109f44c69475.js:5
host: www.movietubenow.com plexit-frame-a5112b9b34b8baebc56f109f44c69475.js:5
protocol: http: plexit-frame-a5112b9b34b8baebc56f109f44c69475.js:5
search: ?v=7383BeysLr0 plexit-frame-a5112b9b34b8baebc56f109f44c69475.js:5
title: Lucy (2014) plexit-frame-a5112b9b34b8baebc56f109f44c69475.js:5
plex: false plexit-frame-a5112b9b34b8baebc56f109f44c69475.js:5
XMLHttpRequest cannot load https://node.plexapp.com:32443/system/services/url/lookup?url=http%3A%2F%2Fwww.movietubenow.com%2Fwatch.php%3Fv%3D7383BeysLr0. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://plex.tv’ is therefore not allowed access. frame?url=http%3A%2F%2Fwww.movietubenow.com%2Fwatch.php%3Fv%3D7383BeysLr0&host=www.movietubenow.com…:1
node error plexit-frame-a5112b9b34b8baebc56f109f44c69475.js:5

But when I try and add the same URL using my PlexIt bookmarklet, nothing is recognized.

There is a difference between the URL Service that's being used by your channel code (that one is local) and the (global) Services.bundle that is being used for the PlexIt! bookmarklet functionality. The latter is a hosted version.

http://localhost:32400/system/services/url/lookup?url= (= local)
vs
http://node.plexapp.com:32400/system/services/url/lookup?url= (= hosted one, used by the bookmarklet)

There is a difference between the URL Service that's being used by your channel code (that one is local) and the (global) Services.bundle that is being used for the PlexIt! bookmarklet functionality. The latter is a hosted version.

http://localhost:32400/system/services/url/lookup?url= (= local)
vs
http://node.plexapp.com:32400/system/services/url/lookup?url= (= hosted one, used by the bookmarklet)

Yes definitely.  But does that mean it should work via channel?  :-P

Yes definitely.  But does that mean it should work via channel?  :-P

The URL Service can be bundled with the channel, the channel can then make use of the service. But the bookmarklet can't work with URL Services bundled with channels.

The URL Service can be bundled with the channel, the channel can then make use of the service. But the bookmarklet can't work with URL Services bundled with channels.

Horrific >.<

PlexDevs, what about to push url untouched directly to PMS if domain is unknown for your servers? 

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.