From c140fb851d0f847c5bd7259cdb1f9482fad27875 Mon Sep 17 00:00:00 2001 From: rouggy Date: Wed, 8 Dec 2021 11:24:29 +0100 Subject: [PATCH] update --- app/plexAutoCollectionUpdater.py | 7 +++---- config/config.py | 1 + models/movie_collection.py | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/plexAutoCollectionUpdater.py b/app/plexAutoCollectionUpdater.py index a84640f..031635f 100644 --- a/app/plexAutoCollectionUpdater.py +++ b/app/plexAutoCollectionUpdater.py @@ -39,12 +39,10 @@ i = 0 length = len(PlexMovieList) while i < length: - for movie in PlexMovieList: - if fuzz.ratio(PlexMovieList[i], movie) > 85 and fuzz.ratio(PlexMovieList[i], movie) < 100: + if 85 < fuzz.ratio(PlexMovieList[i], movie) < 100: if PlexMovieList[i] not in MatchingList: MatchingList.append(PlexMovieList[i]) - i += 1 for movie in MatchingList: @@ -61,4 +59,5 @@ for movie in MatchingList: for id in TMDbCollection: MovieCollectionFinal.append(tmdbCollection.details(id)) -print("") \ No newline at end of file +print(MovieCollectionFinal) +print(AvailablePlexCollectionsMovies) \ No newline at end of file diff --git a/config/config.py b/config/config.py index 79e1854..01faa6b 100644 --- a/config/config.py +++ b/config/config.py @@ -5,3 +5,4 @@ class Config(object): tmdbImgUrl = 'https://image.tmdb.org/t/p/w500' plexBaseUrl = 'https://plex.rouggy.ovh' plexToken = 'VeQQwtf-sNtWWLwzCEih' + PlexAutoCollectionConfigFilePath = '/opt/Plex-Auto-Collections/config/config.yml' diff --git a/models/movie_collection.py b/models/movie_collection.py index 4311660..59078c7 100644 --- a/models/movie_collection.py +++ b/models/movie_collection.py @@ -2,3 +2,6 @@ class MovieCollection: def __init__(self, id, title): self.collectionTitle = title self.collectionId = id + + def get_existing_collections(self): + pass \ No newline at end of file