blacktwin / JBOPS

Just a Bunch Of Plex Scripts
1.67k stars 307 forks source link

Remove Tautulli dependency for hide_episode_spoilers #317

Closed JonnyWong16 closed 2 years ago

JonnyWong16 commented 2 years ago

Retrieve the blurred episode artwork directly from the Plex server to remove the Tautulli dependency. Requries PlexAPI 4.8.0 with the updated transcodeImage method (https://github.com/pkkid/python-plexapi/pull/845).

The modify_episode_artwork function can also be imported into another script to loop across a library.

Example:

from plexapi.server import PlexServer
from JBOPS.utility.hide_episode_spoilers import modify_episode_artwork

plex = PlexServer('http://127.0.0.1:32400', token='XXXXXXXXXXXXXXXXXXXX')
for tvshow in plex.library.section('TV Shows').all():
    modify_episode_artwork(plex, tvshow.ratingKey, blur=25)