This commit is contained in:
Gregory Salaun 2021-12-08 17:07:02 +01:00
parent 63d8f79e52
commit 04946dddb7

View File

@ -34,7 +34,7 @@ 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") 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 movie in plexMoviesLibrary.search():
PlexMovieList.append(movie.title) PlexMovieList.append(movie.title)
print(f":: {dt.now().strftime('%d-%m-%Y %H:%M:%S')} :: CollectionUpdater :: Lists created") print(f":: {dt.now().strftime('%d-%m-%Y %H:%M:%S')} :: CollectionUpdater :: Lists created, found {len(PlexMovieList)} movies")
i = 0 i = 0
@ -43,6 +43,7 @@ length = len(PlexMovieList)
print(f":: {dt.now().strftime('%d-%m-%Y %H:%M:%S')} :: CollectionUpdater :: Comparing Movies in Plex to find similar movies...") print(f":: {dt.now().strftime('%d-%m-%Y %H:%M:%S')} :: CollectionUpdater :: Comparing Movies in Plex to find similar movies...")
while i < length: while i < length:
for movie in PlexMovieList: for movie in PlexMovieList:
print(f":: {dt.now().strftime('%d-%m-%Y %H:%M:%S')} :: CollectionUpdater :: Checking matching between {PlexMovieList[i]} and {movie}, score is: {fuzz.ratio(PlexMovieList[i], movie)}")
if 85 < fuzz.ratio(PlexMovieList[i], movie) < 100: if 85 < fuzz.ratio(PlexMovieList[i], movie) < 100:
if PlexMovieList[i] not in MatchingList: if PlexMovieList[i] not in MatchingList:
MatchingList.append(PlexMovieList[i]) MatchingList.append(PlexMovieList[i])