Guest User

Untitled

a guest
Jun 19th, 2020
790
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1. from plexapi.server import PlexServer
  2. baseurl = 'http://192.168.1.2:32400'
  3. token = 'xxxplextokenherexxx'
  4. plex = PlexServer(baseurl, token)
  5.  
  6. show_section = plex.library.section('TV Shows')
  7. added = show_section.search(sort='titleSort')
  8.  
  9.  
  10. # Add all Showtime shows to Showtime Collection.
  11. # found here https://www.reddit.com/r/PleX/comments/fauq6q/automatically_add_all_your_disney_films_to_a/
  12. for show in added:
  13.     print('%s (%s)' % (show.title, show.studio))
  14.     if show.studio is None:
  15.         pass
  16.     elif show.studio == 'Showtime':
  17.         show.addCollection('Showtime')
Add Comment
Please, Sign In to add comment