This commit is contained in:
Gregory Salaun 2021-12-08 16:47:05 +01:00
parent 8f3d51f38a
commit 891203117c

View File

@ -21,12 +21,10 @@ token = Config.plexToken
plex = PlexServer(baseurl, token)
# Create empty lists
AvailablePlexCollectionsMovies = []
PlexMovieList = []
MatchingList = []
TMDbCollection = []
MovieCollectionFinal = []
print(":: CollectionUpdater :: Creating Empty lists")
# Retrieve the library Movies from Plex
print(f":: {dt.now().strftime('%d-%m-%Y %H:%M:%S')} :: CollectionUpdater :: Retrieving Movies section from Plex")
@ -35,9 +33,6 @@ print(f":: {dt.now().strftime('%d-%m-%Y %H:%M:%S')} :: CollectionUpdater :: Movi
print(f":: {dt.now().strftime('%d-%m-%Y %H:%M:%S')} :: CollectionUpdater :: Creating Movies list and Collection Available in Plex")
for movie in plexMoviesLibrary.search():
for collection in movie.collections:
if collection.tag and collection.tag not in AvailablePlexCollectionsMovies:
AvailablePlexCollectionsMovies.append(collection.tag)
PlexMovieList.append(movie.title)
print(f":: {dt.now().strftime('%d-%m-%Y %H:%M:%S')} :: CollectionUpdater :: Lists created")
@ -53,7 +48,7 @@ while i < length:
MatchingList.append(PlexMovieList[i])
i += 1
print(f":: {dt.now().strftime('%d-%m-%Y %H:%M:%S')} :: CollectionUpdater :: Comparison is finished...")
print(f":: {dt.now().strftime('%d-%m-%Y %H:%M:%S')} :: CollectionUpdater :: Comparison is finished...found {len(MatchingList)} similar movies")
print(f":: {dt.now().strftime('%d-%m-%Y %H:%M:%S')} :: CollectionUpdater :: Searching TMDb for movies in the Matching List")
for movie in MatchingList: