Pass PlexServer object to modify_episode_artwork function
This commit is contained in:
parent
f706e57701
commit
a81ff1fdf9
@ -40,8 +40,7 @@ PLEX_URL = os.getenv('PLEX_URL', PLEX_URL)
|
||||
PLEX_TOKEN = os.getenv('PLEX_TOKEN', PLEX_TOKEN)
|
||||
|
||||
|
||||
def modify_episode_artwork(rating_key, image=None, blur=None, summary_prefix=None, remove=False):
|
||||
plex = PlexServer(PLEX_URL, PLEX_TOKEN)
|
||||
def modify_episode_artwork(plex, rating_key, image=None, blur=None, summary_prefix=None, remove=False):
|
||||
item = plex.fetchItem(rating_key)
|
||||
|
||||
if item.type == 'show':
|
||||
@ -116,4 +115,5 @@ if __name__ == "__main__":
|
||||
parser.add_argument('--remove', action='store_true')
|
||||
opts = parser.parse_args()
|
||||
|
||||
modify_episode_artwork(**vars(opts))
|
||||
plex = PlexServer(PLEX_URL, PLEX_TOKEN)
|
||||
modify_episode_artwork(plex, **vars(opts))
|
||||
|
Loading…
x
Reference in New Issue
Block a user