If i have to render a lot DirectoryObjects I reach Timeouts in the Webclient, that’s why I wanted to split the URLs. If it is a .php url the url service should call a function to retreive the correspondig mkv as a jason from a webserver.
The mkv files are returned succesful, but the .php parsing doesn’t seem to happen. It always returns
I verified that the media is available, and going the way manual works every time. Could someone take a look?
You are doing url = GetJsonFromUrl(url), and the function GetJsonFromUrl returns a JSON Object. Then you are setting the key of the part object to url.
You might need to extract the string containing the actual url from the JSON Object ‘url’.
It Seems there is something deeper wrong. Even this, won’t work.
Passing the hardcoded url in the lookup, returns succesfull, but feeding the Url Service with any other url returns not available instead of the hardcoded url.
def MediaObjectsForURL(url):
if ".mkv" in url:
continue
else:
url = "http://s1.example.com/files/asd1.mkv?st=yAv5SdHBTtrgdJVyHkqR3A&e=1444591762"
The corresponding Log. I think I am too stupid for python tbh. It is always line 28, and line 28 doesn’t contain something specific.
2015-10-11 13:46:27,013 (12bc) : DEBUG (services:616) - Found a service matching ‘http://example.com/Serien-af.php?mov=AF1-1’ - HelloWorldPlugin (com.plexapp.plugins.HelloWorldPlugin)
2015-10-11 13:46:27,029 (12bc) : CRITICAL (core:572) - Exception when calling function ‘MediaObjectsForURL’ (most recent call last):
File “bundles-release/Framework.bundle-dist/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py”, line 294, in call_named_function
File “C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-4ccd2ca\Services.bundle\Contents\Service Sets\com.plexapp.plugins.HelloWorldPlugin\URL\HelloWorldPlugin\ServiceCode.pys”, line 28, in MediaObjectsForURL
raise Ex.MediaNotAvailable
MediaNotAvailable: (2001, ‘This media is not currently available.’)