1

On my client machine, I can query my Plex server for media matching a given string using python-plexapi and I get results.

for section in plex.library.sections():
    items = section.search('Die Hard')

I want to then play the first result in my local browser on the same machine. Looking around at the docs, python-plexapi supports the getStreamURL() method, however, this method returns the stream itself, instead of instructing it to be played in the browser (it would be streamed in an application like VLC, which is not what I am looking for). python-plexapi can also instruct the item to be played through a client. The problem with this is that my local browser rarely appears in the list of connected devices, so this approach is extremly unreliable.

What I am basically looking for is a Plex permalink I can use to get the browser open to the correct content (and have it playing). Something like this:

import webbrowser
webbrowser.open(URL)

where URL contains some Plex ID of the first item returned by python-plexapi. I found the metadata page URL:

http://<IP_ADDRESS>:32400/web/index.html#!/server/<SOME_TOKEN>/details?key=%2Flibrary%2Fmetadata%2F<CONTENT_ID>

however, I cannot find a URL to the player with this content loaded.

Plex Version 1.10.1.4602

0

You must log in to answer this question.

Browse other questions tagged .