script to have plex sync subs
This commit is contained in:
parent
99fd318298
commit
736b59ff27
16
plex.py
Executable file
16
plex.py
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#! /usr/bin/env nix-shell
|
||||||
|
#! nix-shell -i python3 -p python3 python3Packages.plexapi
|
||||||
|
|
||||||
|
from time import sleep
|
||||||
|
from plexapi.server import PlexServer
|
||||||
|
|
||||||
|
baseurl = "http://server:32400"
|
||||||
|
token = "HYWgot9AsfbqGEvHCQrW"
|
||||||
|
plex = PlexServer(baseurl, token)
|
||||||
|
|
||||||
|
for show in plex.library.section("TV Shows").all():
|
||||||
|
print(f"Processing show: {show.title}")
|
||||||
|
for season in show.seasons():
|
||||||
|
print(f" Analyzing season: {season.title}")
|
||||||
|
season.analyze()
|
||||||
|
print(f" Season '{season.title}' analyzed successfully.")
|
||||||
Loading…
x
Reference in New Issue
Block a user