Skip to content

Instantly share code, notes, and snippets.

@blacktwin
Created July 12, 2017 12:58
Show Gist options
  • Save blacktwin/df58032de3e6f4d29f7ea562aeaebbab to your computer and use it in GitHub Desktop.
Save blacktwin/df58032de3e6f4d29f7ea562aeaebbab to your computer and use it in GitHub Desktop.
Find full path for Plex items.
from plexapi.server import PlexServer
PLEX_URL = 'http://localhost:32400'
PLEX_TOKEN = 'xxxxx'
plex = PlexServer(PLEX_URL, PLEX_TOKEN)
sections = plex.library.sections()
titles = [titles for libraries in sections for titles in libraries.search('star')]
for title in titles:
try:
print(''.join([x.file for x in title.iterParts()]))
except Exception:
pass
@ralphcastro
Copy link

Is there a way to find the path of whatever is playing on Plex using PlexPy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment