Analyze plex movies
This commit is contained in:
parent
736b59ff27
commit
3fe4b39dca
6
plex.py
6
plex.py
@ -1,13 +1,17 @@
|
|||||||
#! /usr/bin/env nix-shell
|
#! /usr/bin/env nix-shell
|
||||||
#! nix-shell -i python3 -p python3 python3Packages.plexapi
|
#! nix-shell -i python3 -p python3 python3Packages.plexapi
|
||||||
|
|
||||||
from time import sleep
|
|
||||||
from plexapi.server import PlexServer
|
from plexapi.server import PlexServer
|
||||||
|
|
||||||
baseurl = "http://server:32400"
|
baseurl = "http://server:32400"
|
||||||
token = "HYWgot9AsfbqGEvHCQrW"
|
token = "HYWgot9AsfbqGEvHCQrW"
|
||||||
plex = PlexServer(baseurl, token)
|
plex = PlexServer(baseurl, token)
|
||||||
|
|
||||||
|
for movie in plex.library.section("Movies").all():
|
||||||
|
print(f"Analyzing {movie.title}")
|
||||||
|
movie.analyze()
|
||||||
|
print(f" '{movie.title}' analyzed successfully.")
|
||||||
|
|
||||||
for show in plex.library.section("TV Shows").all():
|
for show in plex.library.section("TV Shows").all():
|
||||||
print(f"Processing show: {show.title}")
|
print(f"Processing show: {show.title}")
|
||||||
for season in show.seasons():
|
for season in show.seasons():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user