Testing URL Service - Troubles

Hi,

I’m trying to get Metadata for some video objects / sources, following the info here (under Testing Your URL Service),
https://support.plex.tv/hc/en-us/articles/201382123-The-Power-of-the-URL-Service

It sort of works, often doesn’t … :(. For example, if I try to use a file:// URL (which works, I can access the file I call out via a web browser), the Plex URL service doesn’t seem to return anything. Also, if I use an http URL, to a video item from, for example, NextPVR … again, from a web browser the file / video downloads, but the Plex URL service doesn’t return anything. Has anyone had this issue? My problem is that this is causing playback to fail when I try to use these URLs … :(.

Any suggestions would be greatly appreciated!

Possibly a dumb question, but have you written the actual URL service that you’re expecting results from? I believe the system log (PMS Plug-in Logs/com.plexapp.system.log) will have more info on the failure if so.

Thanks for the pointer to the log! I do see in the log the “theme” of “No service found for URL”. I admit, a bit confused by this - as these are standard files (MP4, TS). I need to dig more, not sure I understand the service that is needed (so likely the problem here is me … :)).

Thanks again.

Hi,

As I’m trying to understand this a bit more … for a file like "standard’ MP4, why do I need a service? Plex should handle this itself, no?

Thanks!

OK, pulling my hair out here - and I don’t have much to spare … ;).

Trying to follow the thread here, https://forums.plex.tv/discussion/78748/channel-to-view-ts-files-need-to-transcode/p7

It’s making sense, but I’m finding that when I try to run the following (for debugging purposes),
http://htpc.home:32400/system/services/url/lookup?url=http%3A%2F%2Fhtpc.home%3A8866%2Flive%3Frecording%3D905

I’m getting the error,
Aug 26, 2015 20:08:31:745 [3332] DEBUG - Request: [192.168.2.65:59366] GET /system/services/url/lookup?url=http%3A%2F%2Fhtpc.home%3A8866%2Flive%3Frecording%3D905 (4 live) GZIP
Aug 26, 2015 20:08:31:745 [3332] DEBUG - [com.plexapp.system] Sending command over HTTP (GET): /system/services/url/lookup?url=http%3A%2F%2Fhtpc.home%3A8866%2Flive%3Frecording%3D905
Aug 26, 2015 20:08:31:746 [3332] DEBUG - HTTP requesting GET http://127.0.0.1:59844/system/services/url/lookup?url=http%3A%2F%2Fhtpc.home%3A8866%2Flive%3Frecording%3D905
Aug 26, 2015 20:08:31:764 [3332] DEBUG - [com.plexapp.system] HTTP reply status 404, with 0 bytes of content.
Aug 26, 2015 20:08:31:765 [12080] DEBUG - Completed: [192.168.2.65:59366] GET /system/services/url/lookup?url=http%3A%2F%2Fhtpc.home%3A8866%2Flive%3Frecording%3D905 (4 live) GZIP 19ms 140 bytes 404

But yet, if I go to http://htpc.home:8866/live?recording=905 … the file is there! It starts to download.

Confused as to what has broken, as I can’t seem to even get the error above anymore (and I haven’t changed anything … :(), to try to debug my Metadata issues. Thoughts?

Thanks!

Hi,

OK, I think somehow something has changed on my server. Could be me, but not sure what it is … :(. The log seems to be “different” than before, as below …

Earlier …
2015-08-26 12:55:08,776 (25b8) : DEBUG (runtime:717) - Handling request GET /system/services/url/lookup?url=file%3A%2F%2Fhtpc.home%2FConverted%2520TV%2FTV%2520Shows%2FFeherty%2FFeherty-S04E07-Tom%2520Weiskopf.mp4
2015-08-26 12:55:08,778 (25b8) : DEBUG (runtime:814) - Found route matching /system/services/url/lookup
2015-08-26 12:55:08,779 (25b8) : DEBUG (services:23) - Looking up URL ‘file://htpc.home/Converted%20TV/TV%20Shows/Feherty/Feherty-S04E07-Tom%20Weiskopf.mp4’

Now …
Aug 27, 2015 14:17:48:980 [3808] DEBUG - Request: [192.168.2.73:54413] GET /system/services/url/lookup?url=file%3A%2F%2Fhtpc.home%2FConverted%2520TV%2FTV%2520Shows%2FFeherty%2FFeherty-S04E07-Tom%2520Weiskopf.mp4 (3 live) GZIP
Aug 27, 2015 14:17:48:980 [3808] DEBUG - [com.plexapp.system] Sending command over HTTP (GET): /system/services/url/lookup?url=file%3A%2F%2Fhtpc.home%2FConverted%2520TV%2FTV%2520Shows%2FFeherty%2FFeherty-S04E07-Tom%2520Weiskopf.mp4
Aug 27, 2015 14:17:48:980 [3808] DEBUG - HTTP requesting GET http://127.0.0.1:49422/system/services/url/lookup?url=file%3A%2F%2Fhtpc.home%2FConverted%20TV%2FTV%20Shows%2FFeherty%2FFeherty-S04E07-Tom%20Weiskopf.mp4
Aug 27, 2015 14:17:48:980 [3808] DEBUG - [com.plexapp.system] HTTP reply status 404, with 0 bytes of content.

For some reason this is “lost” now? Found route matching /system/services/url/lookup

Thoughts?

Thanks!!!

Hi,

More digging, and remembering that a few days ago I installed the latest server update. Has anyone been able to confirm that the lookup service works in the latest version of the server? I could be wrong, but I don’t think it’s working for me.

Thanks!

@rkmorris said:
Hi,

As I’m trying to understand this a bit more … for a file like "standard’ MP4, why do I need a service? Plex should handle this itself, no?

URL Services are not meant to work with direct video links. URL Services work for a URL that is associated with a video (it “converts” a URL into a MetadataObject and MediaObjects).

Makes sense, thanks! I did try it with a URL as well, but that may be me. Let me go back to that, dig some more.

Much appreciated!

OK, just tried with a URL, same issue - log below. Thoughts? Just me (likely)? BTW, I did test the URL, and it works … ;). It doesn’t seem to be finding the lookup service though - but I may be missing something. This was working, but I am struggling with the latest server version (but that may not be it).

Aug 29, 2015 11:04:25:808 [10280] DEBUG - [com.plexapp.system] Sending command over HTTP (GET): /system/services/url/lookup?url=http%3A%2F%2Fhtpc.home%3A8866%2Flive%3Fchannel%3D505
Aug 29, 2015 11:04:25:809 [10280] DEBUG - HTTP requesting GET http://127.0.0.1:63610/system/services/url/lookup?url=http%3A%2F%2Fhtpc.home%3A8866%2Flive%3Fchannel%3D505
Aug 29, 2015 11:04:25:849 [10280] DEBUG - [com.plexapp.system] HTTP reply status 404, with 0 bytes of content.
Aug 29, 2015 11:04:25:850 [8908] DEBUG - Completed: [192.168.2.65:60773] GET /system/services/url/lookup?url=http%3A%2F%2Fhtpc.home%3A8866%2Flive%3Fchannel%3D505 (9 live) GZIP 42ms 140 bytes 404```


Thanks!

@rkmorris said:
OK, just tried with a URL, same issue - log below. Thoughts? Just me (likely)? BTW, I did test the URL, and it works … ;). It doesn’t seem to be finding the lookup service though - but I may be missing something. This was working, but I am struggling with the latest server version (but that may not be it).

Did you update the URL Service to match this new/different URL (the URLPattern regex in the .plist file). And if so, did you escape the special ? character? And did you restart PMS after those changes?

Escaping the character was the issue - thanks very much for the help!