From 3fe4b39dca6b00b2e2c9c8c5f147f22ed27fba33 Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Sat, 30 Nov 2024 14:16:01 -0600 Subject: [PATCH] Analyze plex movies --- plex.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plex.py b/plex.py index 1688894..a1cea80 100755 --- a/plex.py +++ b/plex.py @@ -1,13 +1,17 @@ #! /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 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(): print(f"Processing show: {show.title}") for season in show.seasons():