This commit is contained in:
Gregory Salaun 2021-12-08 13:24:33 +01:00
parent 9600a99bf7
commit ca3b5df00f
2 changed files with 15 additions and 4 deletions

View File

@ -4,6 +4,7 @@ from plexapi.server import PlexServer
from fuzzywuzzy import fuzz
from models.movie_collection import MovieCollection
from datetime import datetime as dt
import yaml
# Instantiate Tmdb object
tmdb = TMDb()
@ -37,7 +38,6 @@ for movie in plexMoviesLibrary.search():
for collection in movie.collections:
if collection.tag and collection.tag not in AvailablePlexCollectionsMovies:
AvailablePlexCollectionsMovies.append(collection.tag)
print(f":: {dt.now().strftime('%d-%m-%Y %H:%M:%S')} :: CollectionUpdater :: Adding {movie.title} in the list of movies Available in Plex")
PlexMovieList.append(movie.title)
print(f":: {dt.now().strftime('%d-%m-%Y %H:%M:%S')} :: CollectionUpdater :: Lists created")
@ -76,3 +76,8 @@ for movie in MovieCollectionFinal:
coll.collectionTitle = movie.name[:nameLength - 13]
coll.collectionId = movie.id
print(f"Collection {coll.collectionTitle} with Id: {coll.collectionId} has been added")
print(f":: {dt.now().strftime('%d-%m-%Y %H:%M:%S')} :: Checking Yaml File...")
with open(Config.PlexAutoCollectionConfigFilePath, 'a') as f:
print(yaml.safe_load(f))

View File

@ -1,3 +1,9 @@
tmdbv3api==1.7.6
PlexAPI==4.8.0
certifi==2021.10.8
charset-normalizer==2.0.8
fuzzywuzzy==0.18.0
idna==3.3
PlexAPI==4.8.0
PyYAML==6.0
requests==2.26.0
tmdbv3api==1.7.6
urllib3==1.26.7