diff --git a/modules/config.py b/modules/config.py index f14a256f..ab3978ad 100644 --- a/modules/config.py +++ b/modules/config.py @@ -289,8 +289,10 @@ class ConfigFile: "ignore_imdb_ids": check_for_attribute(self.data, "ignore_imdb_ids", parent="settings", var_type="list", default_is_none=True), "playlist_sync_to_users": check_for_attribute(self.data, "playlist_sync_to_users", parent="settings", default="all", default_is_none=True), "verify_ssl": check_for_attribute(self.data, "verify_ssl", parent="settings", var_type="bool", default=True), + "custom_repo": check_for_attribute(self.data, "custom_repo", parent="settings", default_is_none=True), "assets_for_all": check_for_attribute(self.data, "assets_for_all", parent="settings", var_type="bool", default=False, save=False, do_print=False) } + self.custom_repo = self.general["custom_repo"] self.session = requests.Session() if not self.general["verify_ssl"]: @@ -447,6 +449,9 @@ class ConfigFile: git = check_dict("git") if git: playlists_pairs.append(("Git", git)) + repo = check_dict("repo") + if repo: + playlists_pairs.append(("Repo", repo)) file = check_dict("file") if file: playlists_pairs.append(("File", file)) @@ -727,6 +732,7 @@ class ConfigFile: params["metadata_path"].append((name, path[attr])) check_dict("url", "URL") check_dict("git", "Git") + check_dict("repo", "Repo") check_dict("file", "File") check_dict("folder", "Folder") else: diff --git a/modules/meta.py b/modules/meta.py index fb9d1065..1d210ad3 100644 --- a/modules/meta.py +++ b/modules/meta.py @@ -65,8 +65,10 @@ class DataFile: def load_file(self): try: - if self.type in ["URL", "Git"]: - content_path = self.path if self.type == "URL" else f"{github_base}{self.path}.yml" + if self.type in ["URL", "Git", "Repo"]: + if self.type == "Repo" and not self.config.custom_repo: + raise Failed("Config Error: No custom_repo defined") + content_path = self.path if self.type == "URL" else f"{self.config.custom_repo if self.type == 'Repo' else github_base}{self.path}.yml" response = self.config.get(content_path) if response.status_code >= 400: raise Failed(f"URL Error: No file found at {content_path}") diff --git a/requirements.txt b/requirements.txt index 4374a070..30f159c7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -PlexAPI==4.9.0 +PlexAPI==4.9.1 tmdbapis==0.1.8 arrapi==1.3.0 lxml==4.7.1