Create plexapi_search_file.py

https://gist.github.com/blacktwin/df58032de3e6f4d29f7ea562aeaebbab
This commit is contained in:
blacktwin 2017-07-12 14:21:34 -04:00 committed by GitHub
parent cbdf582b35
commit 02fb076746

13
plexapi_search_file.py Normal file
View File

@ -0,0 +1,13 @@
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