From 904f85bb9405c7a19bea4d4e4b9477463cef0ac1 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Tue, 30 Apr 2024 11:37:31 -0400 Subject: [PATCH] [15] fix MDBList --- VERSION | 2 +- docs/config/mdblist.md | 8 +++--- docs/config/operations.md | 36 +++++++++++++------------- docs/defaults/movie/seasonal.md | 2 +- docs/files/builders/mdblist.md | 18 ++++++------- docs/files/builders/overview.md | 6 ++--- docs/files/overlays.md | 22 ++++++++-------- docs/kometa/acknowledgements.md | 2 +- docs/kometa/guides/ratings.md | 2 +- docs/kometa/logs.md | 2 +- mkdocs.yml | 4 +-- modules/builder.py | 4 +-- modules/config.py | 46 ++++++++++++++++----------------- modules/mdblist.py | 20 +++++++------- modules/operations.py | 8 +++--- modules/overlays.py | 8 +++--- 16 files changed, 95 insertions(+), 95 deletions(-) diff --git a/VERSION b/VERSION index c3118d9c..6d7ea00c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0-develop14 +2.0.0-develop15 diff --git a/docs/config/mdblist.md b/docs/config/mdblist.md index 4a54dfef..11239ef3 100644 --- a/docs/config/mdblist.md +++ b/docs/config/mdblist.md @@ -1,6 +1,6 @@ -# MdbList Attributes +# MDBList Attributes -Configuring [MdbList](https://mdblist.com/) is optional but can allow you to mass edit metadata. +Configuring [MDBList](https://mdblist.com/) is optional but can allow you to mass edit metadata. A `mdblist` mapping is in the root of the config file. @@ -13,12 +13,12 @@ mdblist: | Attribute | Allowed Values | Default | Required | |:-------------------|:--------------------------------------------------------------------------|:--------|:------------------------------------------:| -| `apikey` | MdbList API Key | N/A | :fontawesome-solid-circle-check:{ .green } | +| `apikey` | MDBList API Key | N/A | :fontawesome-solid-circle-check:{ .green } | | `cache_expiration` | Number of days before each cache mapping expires and has to be re-cached. | 60 | :fontawesome-solid-circle-xmark:{ .red } | ???+ tip - The MdbList apikey can be found [here](https://mdblist.com/preferences/). + The MDBList apikey can be found [here](https://mdblist.com/preferences/). The free apikey is limited to 1000 requests per day so if you hit your limit the program should be able to pick up where it left off the next day as long as the `cache` [Setting](settings.md#cache) is enabled. diff --git a/docs/config/operations.md b/docs/config/operations.md index 6c44826d..52a8470d 100644 --- a/docs/config/operations.md +++ b/docs/config/operations.md @@ -158,11 +158,11 @@ You can create individual blocks of operations by using a list under `operations **Accepted Values:** Source or List of sources to use in that order - - - - - + + + + + @@ -279,8 +279,8 @@ You can create individual blocks of operations by using a list under `operations - - + + @@ -330,17 +330,17 @@ You can create individual blocks of operations by using a list under `operations - - - - - - - - - - - + + + + + + + + + + + diff --git a/docs/defaults/movie/seasonal.md b/docs/defaults/movie/seasonal.md index 5ec70669..2fe1e1e6 100644 --- a/docs/defaults/movie/seasonal.md +++ b/docs/defaults/movie/seasonal.md @@ -70,7 +70,7 @@ work. Any value not specified will use its default value if it has one if not it | `imdb_list_<>`1 | **Description:** Adds the Movies in the IMDb List to the specified key's collection. Overrides the [default imdb_list](#imdb-list) for that collection if used.
**Values:** List of IMDb List URLs | | | | `imdb_search_<>`1 | **Description:** Adds the Movies in the IMDb Search to the specified key's collection. Overrides the [default imdb_search](#imdb-search) for that collection if used.
**Values:** List of IMDb List URLs | | | | `trakt_list_<>`1 | **Description:** Adds the Movies in the Trakt List to the specified key's collection. Overrides the [default trakt_list](#trakt-list) for that collection if used.
**Values:** List of Trakt List URLs | | | | - | `mdblist_list_<>`1 | **Description:** Adds the Movies in the MDb List to the specified key's collection. Overrides the [default mdblist_list](#mdblist-list) for that collection if used.
**Values:** List of MDbList URLs | | | | + | `mdblist_list_<>`1 | **Description:** Adds the Movies in the MDb List to the specified key's collection. Overrides the [default mdblist_list](#mdblist-list) for that collection if used.
**Values:** List of MDBList URLs | | | | | `emoji` | **Description:** Controls the Emoji Prefix for all Collections. Set to `""` to remove all emojis.
**Values:** Any String | | `emoji_<>`1 | **Description:** Controls the Emoji Prefix for the specified key's collection. Overrides the [default emoji](#emoji) for that collection if used.
**Values:** Any String | | `limit` | **Description:** Changes the Builder Limit for all collections in this file.
**Values:** Number Greater than 0 | diff --git a/docs/files/builders/mdblist.md b/docs/files/builders/mdblist.md index 6bd25c1a..7ead3475 100644 --- a/docs/files/builders/mdblist.md +++ b/docs/files/builders/mdblist.md @@ -1,16 +1,16 @@ -# MdbList Builders +# MDBList Builders -You can find items using the features of [MdbList.com](https://mdblist.com/) (MdbList). +You can find items using the features of [MDBList.com](https://mdblist.com/) (MDBList). | Attribute | Description | Works with Movies | Works with Shows | Works with Playlists and Custom Sort | |:--------------------------------|:--------------------------------------------------------------------------|:------------------------------------------:|:------------------------------------------:|:------------------------------------------:| -| [`mdblist_list`](#mdblist-list) | Gets every movie/show in a [MdbList List](https://mdblist.com/toplists/). | :fontawesome-solid-circle-check:{ .green } | :fontawesome-solid-circle-check:{ .green } | :fontawesome-solid-circle-check:{ .green } | +| [`mdblist_list`](#mdblist-list) | Gets every movie/show in a [MDBList List](https://mdblist.com/toplists/). | :fontawesome-solid-circle-check:{ .green } | :fontawesome-solid-circle-check:{ .green } | :fontawesome-solid-circle-check:{ .green } | -## MdbList List +## MDBList List -Finds every item in a [MdbList List](https://mdblist.com/toplists/). +Finds every item in a [MDBList List](https://mdblist.com/toplists/). -The expected input is an MdbList List URL. Multiple values are supported as a list only a comma-separated string will not work. +The expected input is an MDBList List URL. Multiple values are supported as a list only a comma-separated string will not work. The `sync_mode: sync` and `collection_order: custom` Setting are recommended since the lists are continuously updated and in a specific order. @@ -40,9 +40,9 @@ The default `sort_by` when it's not specified is `rank.asc`. | Option | Description | |:----------------------------------------------|:-------------------------------| -| `rank.asc`
`rank.desc` | Sort by MdbList Rank | -| `score.asc`
`score.desc` | Sort by MdbList Score | -| `score_average.asc`
`score_average.desc` | Sort by MdbList Average Score | +| `rank.asc`
`rank.desc` | Sort by MDBList Rank | +| `score.asc`
`score.desc` | Sort by MDBList Score | +| `score_average.asc`
`score_average.desc` | Sort by MDBList Average Score | | `released.asc`
`released.desc` | Sort by Release Date | | `imdbrating.asc`
`imdbrating.desc` | Sort by IMDb Rating | | `imdbvotes.asc`
`imdbvotes.desc` | Sort by IMDb Votes | diff --git a/docs/files/builders/overview.md b/docs/files/builders/overview.md index 2c4148ad..85480859 100644 --- a/docs/files/builders/overview.md +++ b/docs/files/builders/overview.md @@ -61,15 +61,15 @@ Builders use third-party services to source items to be added to the collection. !!! builder - ![MdbList logo](../../../assets/icons/mdblist.png){ align=right } + ![MDBList logo](../../../assets/icons/mdblist.png){ align=right } - **[MdbList](../mdblist)** builders grab items based on lists on MdbList.com + **[MDBList](../mdblist)** builders grab items based on lists on MDBList.com [:octicons-home-16: View Builder](../mdblist){ .md-button .md-button--primary } ??? quicklink "Popular Builders" - - [:octicons-list-ordered-16: MdbList List](../mdblist/#mdblist-list) - Gets every movie/show in a MDbList List. + - [:octicons-list-ordered-16: MDBList List](../mdblist/#mdblist-list) - Gets every movie/show in a MDBList List. !!! builder diff --git a/docs/files/overlays.md b/docs/files/overlays.md index ac50bf54..d4957dde 100644 --- a/docs/files/overlays.md +++ b/docs/files/overlays.md @@ -319,17 +319,17 @@ Each Special Text Variables has multiple modifiers that can be used to format th | `imdb_rating` | IMDb Rating | `Movies`, `Shows`, or `Episodes` | | `trakt_user_rating` | Trakt User Rating | `Movies` or `Shows` | | `omdb_rating` | OMDb Rating | `Movies` or `Shows` | -| `mdb_rating` | MDbList Rating | `Movies` or `Shows` | -| `mdb_average_rating` | MDbList Average Rating | `Movies` or `Shows` | -| `mdb_imdb_rating` | MDbList IMDb Rating | `Movies` or `Shows` | -| `mdb_metacritic_rating` | MDbList Metacritic Rating | `Movies` or `Shows` | -| `mdb_metacriticuser_rating` | MDbList Metacritic User Rating | `Movies` or `Shows` | -| `mdb_trakt_rating` | MDbList Trakt Rating | `Movies` or `Shows` | -| `mdb_tomatoes_rating` | MDbList Rotten Tomatoes Rating | `Movies` or `Shows` | -| `mdb_tomatoesaudience_rating` | MDbList Rotten Tomatoes Audience Rating | `Movies` or `Shows` | -| `mdb_tmdb_rating` | MDbList TMDb Rating | `Movies` or `Shows` | -| `mdb_letterboxd_rating` | MDbList Letterboxd Rating | `Movies` or `Shows` | -| `mdb_myanimelist_rating` | MDbList MyAnimeList Rating | `Movies` or `Shows` | +| `mdb_rating` | MDBList Rating | `Movies` or `Shows` | +| `mdb_average_rating` | MDBList Average Rating | `Movies` or `Shows` | +| `mdb_imdb_rating` | MDBList IMDb Rating | `Movies` or `Shows` | +| `mdb_metacritic_rating` | MDBList Metacritic Rating | `Movies` or `Shows` | +| `mdb_metacriticuser_rating` | MDBList Metacritic User Rating | `Movies` or `Shows` | +| `mdb_trakt_rating` | MDBList Trakt Rating | `Movies` or `Shows` | +| `mdb_tomatoes_rating` | MDBList Rotten Tomatoes Rating | `Movies` or `Shows` | +| `mdb_tomatoesaudience_rating` | MDBList Rotten Tomatoes Audience Rating | `Movies` or `Shows` | +| `mdb_tmdb_rating` | MDBList TMDb Rating | `Movies` or `Shows` | +| `mdb_letterboxd_rating` | MDBList Letterboxd Rating | `Movies` or `Shows` | +| `mdb_myanimelist_rating` | MDBList MyAnimeList Rating | `Movies` or `Shows` | | `anidb_rating` | AniDB Rating | `Movies` or `Shows` | | `anidb_average_rating` | AniDB Average Rating | `Movies` or `Shows` | | `anidb_score_rating` | AniDB Score Rating | `Movies` or `Shows` | diff --git a/docs/kometa/acknowledgements.md b/docs/kometa/acknowledgements.md index 1612741b..671cafcf 100644 --- a/docs/kometa/acknowledgements.md +++ b/docs/kometa/acknowledgements.md @@ -28,7 +28,7 @@ These are the developers and creators who are an active part of the Kometa commu | Acknowledgement | Reason | Sponsor the Developer | |:---------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------:| | [chazlarson](https://github.com/chazlarson/) | Creator of [Media-Scripts](https://github.com/chazlarson/Media-Scripts) which offers supporting functionality to users of Kometa | [Click Here](https://www.google.com/search?q=food+shelf+near+me) | -| [linas](https://github.com/linaspurinis) | Creator of [MDBlist.com](https://github.com/deva5610/IMDBList2PlexCollection) which makes creating Kometa compatible lists easy | [Click Here](https://www.patreon.com/mdblist/posts) | +| [linas](https://github.com/linaspurinis) | Creator of [MDBList.com](https://github.com/deva5610/IMDBList2PlexCollection) which makes creating Kometa compatible lists easy | [Click Here](https://www.patreon.com/mdblist/posts) | | [nitsua](https://github.com/austinwbest) | Creator of [Notifiarr](https://github.com/Notifiarr) which integrates Kometa with Discord | [Click Here](https://github.com/sponsors/Notifiarr) | | [ZeroQI](https://github.com/ZeroQI) | Creator of [Absolute Series Scanner](https://github.com/ZeroQI/Absolute-Series-Scanner) and the [HTTP Anidb Metadata Agent (HAMA)](https://github.com/ZeroQI/Hama.bundle) | [Click Here](https://github.com/sponsors/ZeroQI) | | [ScudLee](https://github.com/ScudLee) | Creator of [AniDb Anime Lists](https://github.com/Anime-Lists/anime-lists) | :fontawesome-solid-circle-xmark:{ .red } | diff --git a/docs/kometa/guides/ratings.md b/docs/kometa/guides/ratings.md index a0747fc7..fb45d8bf 100644 --- a/docs/kometa/guides/ratings.md +++ b/docs/kometa/guides/ratings.md @@ -202,7 +202,7 @@ The log will show Kometa updating those values. #### Use Trakt Rating -Let's change the Trakt rating to that trakt public rating of `85%` instead, which is available via MDbList: +Let's change the Trakt rating to that trakt public rating of `85%` instead, which is available via MDBList: ??? example "Updated config (click to expand)" diff --git a/docs/kometa/logs.md b/docs/kometa/logs.md index 3dca0098..e0d4f28b 100644 --- a/docs/kometa/logs.md +++ b/docs/kometa/logs.md @@ -84,7 +84,7 @@ This table details examples of the most commonly-seen `[ERROR]` events and what | `ERROR` | `Plex Error: No Items found in Plex` | While using the Kometa builder, no items with that criteria were returned from Plex | This may be normal and require 0 actions. However, if you expect that Plex should have returned records, check the builder to ensure it is working properly | | `ERROR` | `IMDb Error: Failed to parse URL:` | While using the Kometa builder, url does not exist | This may be normal and require 0 actions. However, if you expect that the URL should have returned records, check the url in your browser to ensure it is working properly | | `ERROR` | `Trakt Error: No TVDb ID found for Nightfall (2022)` | Online sources are missing information | These sorts of errors indicate that the thing can't be cross-referenced between sites.
For example, at the time of that error, the Trakt record for "Nightfall (2022)" didn't contain a TVDb ID.
This could be because the record just hasn't been updated, or because "Nightfall (2022)" is not listed on TVDb.
The fix is for someone [like you, perhaps] to go to the relevant site and fill in the missing data. | -| `ERROR` | `MdbList Error: Not Found` | Online sources are missing information | These sorts of errors indicate that the thing can't be cross-referenced between sites. For example, at the time of that error, the MDBlist record was trying to get a rating for a media item and could not find it. | +| `ERROR` | `MDBList Error: Not Found` | Online sources are missing information | These sorts of errors indicate that the thing can't be cross-referenced between sites. For example, at the time of that error, the MDBList record was trying to get a rating for a media item and could not find it. | | `ERROR` | `Plex Error: actor: Mel B not found` | Actor not found and hence unable to create the collection | Report error in #kometa-help channel and see if there is a fix. | | `ERROR` | `Input Failed` | A token or password is no longer valid for an online source of information | Review the kometa.log for more information | | `ERROR` | `Collection Error: trakt_list requires Trakt to be configured` | You are using a builder that has not been configured yet. | Review the kometa.log for more information on what went wrong. Refer to the wiki for details on how to set this up (in this case Trakt) | diff --git a/mkdocs.yml b/mkdocs.yml index 6c79b7c9..209856f5 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -183,7 +183,7 @@ nav: - Tautulli: config/tautulli.md - Github: config/github.md - OMDb: config/omdb.md - - MdbList: config/mdblist.md + - MDBList: config/mdblist.md - Notifiarr: config/notifiarr.md - Gotify: config/gotify.md - AniDB: config/anidb.md @@ -327,7 +327,7 @@ nav: - Tautulli Builders: files/builders/tautulli.md - Radarr Builders: files/builders/radarr.md - Sonarr Builders: files/builders/sonarr.md - - MdbList Builders: files/builders/mdblist.md + - MDBList Builders: files/builders/mdblist.md - Letterboxd Builders: files/builders/letterboxd.md - ICheckMovies Builders: files/builders/icheckmovies.md - BoxOfficeMojo Builders: files/builders/mojo.md diff --git a/modules/builder.py b/modules/builder.py index 93cd5e87..a0d82848 100644 --- a/modules/builder.py +++ b/modules/builder.py @@ -1965,7 +1965,7 @@ def _reciperr(self, method_name, method_data): self.builders.append((method_name, util.parse(self.Type, method_name, method_data, "bool"))) def _mdblist(self, method_name, method_data): - for mdb_dict in self.config.Mdblist.validate_mdblist_lists(self.Type, method_data): + for mdb_dict in self.config.MDBList.validate_mdblist_lists(self.Type, method_data): self.builders.append((method_name, mdb_dict)) def _tautulli(self, method_name, method_data): @@ -2214,7 +2214,7 @@ def gather_ids(self, method, value): elif "mojo" in method: ids = self.config.BoxOfficeMojo.get_imdb_ids(method, value) elif "mdblist" in method: - ids = self.config.Mdblist.get_tmdb_ids(method, value, self.library.is_movie if not self.playlist else None) + ids = self.config.MDBList.get_tmdb_ids(method, value, self.library.is_movie if not self.playlist else None) elif "tmdb" in method: ids = self.config.TMDb.get_tmdb_ids(method, value, self.library.is_movie, self.tmdb_region) elif "trakt" in method: diff --git a/modules/config.py b/modules/config.py index c1806f39..bbb99a1b 100644 --- a/modules/config.py +++ b/modules/config.py @@ -22,7 +22,7 @@ from modules.radarr import Radarr from modules.sonarr import Sonarr from modules.reciperr import Reciperr -from modules.mdblist import Mdblist +from modules.mdblist import MDBList from modules.tautulli import Tautulli from modules.tmdb import TMDb from modules.trakt import Trakt @@ -62,9 +62,9 @@ } mass_content_options = { "lock": "Lock Rating", "unlock": "Unlock Rating", "remove": "Remove and Lock Rating", "reset": "Remove and Unlock Rating", - "omdb": "Use IMDb Rating through OMDb", "mdb": "Use MdbList Rating", - "mdb_commonsense": "Use Commonsense Rating through MDbList", "mdb_commonsense0": "Use Commonsense Rating with Zero Padding through MDbList", - "mdb_age_rating": "Use MDbList Age Rating", "mdb_age_rating0": "Use MDbList Age Rating with Zero Padding", + "omdb": "Use IMDb Rating through OMDb", "mdb": "Use MDBList Rating", + "mdb_commonsense": "Use Commonsense Rating through MDBList", "mdb_commonsense0": "Use Commonsense Rating with Zero Padding through MDBList", + "mdb_age_rating": "Use MDBList Age Rating", "mdb_age_rating0": "Use MDBList Age Rating with Zero Padding", "mal": "Use MyAnimeList Rating" } mass_collection_content_options = { @@ -89,7 +89,7 @@ } mass_available_options = { "lock": "Lock Originally Available", "unlock": "Unlock Originally Available", "remove": "Remove and Lock Originally Available", "reset": "Remove and Unlock Originally Available", - "tmdb": "Use TMDb Release", "omdb": "Use IMDb Release through OMDb", "mdb": "Use MdbList Release", "mdb_digital": "Use MdbList Digital Release", "tvdb": "Use TVDb Release", + "tmdb": "Use TMDb Release", "omdb": "Use IMDb Release through OMDb", "mdb": "Use MDBList Release", "mdb_digital": "Use MDBList Digital Release", "tvdb": "Use TVDb Release", "anidb": "Use AniDB Release", "mal": "Use MyAnimeList Release" } mass_image_options = { @@ -108,17 +108,17 @@ "imdb": "Use IMDb Rating", "trakt_user": "Use Trakt User Rating", "omdb": "Use IMDb Rating through OMDb", - "mdb": "Use MdbList Score", - "mdb_average": "Use MdbList Average Score", - "mdb_imdb": "Use IMDb Rating through MDbList", - "mdb_metacritic": "Use Metacritic Rating through MDbList", - "mdb_metacriticuser": "Use Metacritic User Rating through MDbList", - "mdb_trakt": "Use Trakt Rating through MDbList", - "mdb_tomatoes": "Use Rotten Tomatoes Rating through MDbList", - "mdb_tomatoesaudience": "Use Rotten Tomatoes Audience Rating through MDbList", - "mdb_tmdb": "Use TMDb Rating through MDbList", - "mdb_letterboxd": "Use Letterboxd Rating through MDbList", - "mdb_myanimelist": "Use MyAnimeList Rating through MDbList", + "mdb": "Use MDBList Score", + "mdb_average": "Use MDBList Average Score", + "mdb_imdb": "Use IMDb Rating through MDBList", + "mdb_metacritic": "Use Metacritic Rating through MDBList", + "mdb_metacriticuser": "Use Metacritic User Rating through MDBList", + "mdb_trakt": "Use Trakt Rating through MDBList", + "mdb_tomatoes": "Use Rotten Tomatoes Rating through MDBList", + "mdb_tomatoesaudience": "Use Rotten Tomatoes Audience Rating through MDBList", + "mdb_tmdb": "Use TMDb Rating through MDBList", + "mdb_letterboxd": "Use Letterboxd Rating through MDBList", + "mdb_myanimelist": "Use MyAnimeList Rating through MDBList", "anidb_rating": "Use AniDB Rating", "anidb_average": "Use AniDB Average", "anidb_score": "Use AniDB Review Dcore", @@ -623,21 +623,21 @@ def check_for_attribute(data, attribute, parent=None, test_list=None, default=No logger.separator() - self.Mdblist = Mdblist(self) + self.MDBList = MDBList(self) if "mdblist" in self.data: - logger.info("Connecting to Mdblist...") + logger.info("Connecting to MDBList...") try: - self.Mdblist.add_key( + self.MDBList.add_key( check_for_attribute(self.data, "apikey", parent="mdblist", throw=True), check_for_attribute(self.data, "cache_expiration", parent="mdblist", var_type="int", default=60, int_min=1) ) - logger.info("Mdblist Connection Successful") + logger.info("MDBList Connection Successful") except Failed as e: if str(e).endswith("is blank"): logger.warning(e) else: logger.error(e) - logger.info("Mdblist Connection Failed") + logger.info("MDBList Connection Failed") else: logger.info("mdblist attribute not found") @@ -991,8 +991,8 @@ def check_for_attribute(data, attribute, parent=None, test_list=None, default=No for source in sources: if source and source == "omdb" and self.OMDb is None: raise Failed(f"{source} without a successful OMDb Connection") - if source and str(source).startswith("mdb") and not self.Mdblist.has_key: - raise Failed(f"{source} without a successful MdbList Connection") + if source and str(source).startswith("mdb") and not self.MDBList.has_key: + raise Failed(f"{source} without a successful MDBList Connection") if source and str(source).startswith("anidb") and not self.AniDB.is_authorized: raise Failed(f"{source} without a successful AniDB Connection") if source and str(source).startswith("mal") and self.MyAnimeList is None: diff --git a/modules/mdblist.py b/modules/mdblist.py index 325e20fc..4556b4a9 100644 --- a/modules/mdblist.py +++ b/modules/mdblist.py @@ -71,7 +71,7 @@ def __init__(self, data): self.age_rating = data["age_rating"] -class Mdblist: +class MDBList: def __init__(self, config): self.config = config self.apikey = None @@ -110,12 +110,12 @@ def _request(self, url, params=None): time.sleep(0.2 if self.supporter else 1) response = self.config.get_json(url, params=final_params) except JSONDecodeError: - raise Failed("Mdblist Error: JSON Decoding Failed") + raise Failed("MDBList Error: JSON Decoding Failed") if "response" in response and (response["response"] is False or response["response"] == "False"): if response["error"] in ["API Limit Reached!", "API Rate Limit Reached!"]: self.limit = True - raise LimitReached(f"MdbList Error: {response['error']}") - raise Failed(f"MdbList Error: {response['error']}") + raise LimitReached(f"MDBList Error: {response['error']}") + raise Failed(f"MDBList Error: {response['error']}") return response def get_item(self, imdb_id=None, tmdb_id=None, tvdb_id=None, is_movie=True, ignore_cache=False): @@ -132,7 +132,7 @@ def get_item(self, imdb_id=None, tmdb_id=None, tvdb_id=None, is_movie=True, igno params["m"] = "movie" if is_movie else "show" key = f"{'tvm' if is_movie else 'tvs'}{tvdb_id}" else: - raise Failed("MdbList Error: Either IMDb ID, TVDb ID, or TMDb ID and TMDb Type Required") + raise Failed("MDBList Error: Either IMDb ID, TVDb ID, or TMDb ID and TMDb Type Required") expired = None if self.config.Cache and not ignore_cache: mdb_dict, expired = self.config.Cache.query_mdb(key, self.expiration) @@ -198,7 +198,7 @@ def validate_mdblist_lists(self, error_type, mdb_lists): def get_tmdb_ids(self, method, data, is_movie=None): if method == "mdblist_list": - logger.info(f"Processing Mdblist.com List: {data['url']}") + logger.info(f"Processing MDBList.com List: {data['url']}") logger.info(f"Sort By: {data['sort_by']}") sort, direction = data["sort_by"].split(".") params = {"sort": sort, "sortorder": direction} @@ -216,14 +216,14 @@ def get_tmdb_ids(self, method, data, is_movie=None): if (isinstance(response, dict) and "error" in response) or (isinstance(response, list) and response and "error" in response[0]): err = response["error"] if isinstance(response, dict) else response[0]["error"] if err in ["empty", "empty or private list"]: - raise Failed(f"Mdblist Error: No Items Returned. Lists can take 24 hours to update so try again later.") - raise Failed(f"Mdblist Error: Invalid Response {response}") + raise Failed(f"MDBList Error: No Items Returned. Lists can take 24 hours to update so try again later.") + raise Failed(f"MDBList Error: Invalid Response {response}") results = [] for item in response: if item["mediatype"] in ["movie", "show"]: results.append((item["id"], "tmdb" if item["mediatype"] == "movie" else "tmdb_show")) return results except JSONDecodeError: - raise Failed(f"Mdblist Error: Invalid JSON Response received") + raise Failed(f"MDBList Error: Invalid JSON Response received") else: - raise Failed(f"Mdblist Error: Method {method} not supported") + raise Failed(f"MDBList Error: Method {method} not supported") diff --git a/modules/operations.py b/modules/operations.py index 87a8ab60..978bfada 100644 --- a/modules/operations.py +++ b/modules/operations.py @@ -229,10 +229,10 @@ def mdb_obj(): nonlocal _mdb_obj if _mdb_obj is None: _mdb_obj = False - if self.config.Mdblist.limit is False: + if self.config.MDBList.limit is False: if self.library.is_show and tvdb_id: try: - _mdb_obj = self.config.Mdblist.get_series(tvdb_id) + _mdb_obj = self.config.MDBList.get_series(tvdb_id) except LimitReached as err: logger.debug(err) except Failed as err: @@ -242,7 +242,7 @@ def mdb_obj(): raise if self.library.is_movie and tmdb_id: try: - _mdb_obj = self.config.Mdblist.get_movie(tmdb_id) + _mdb_obj = self.config.MDBList.get_movie(tmdb_id) except LimitReached as err: logger.debug(err) except Failed as err: @@ -252,7 +252,7 @@ def mdb_obj(): raise if imdb_id and not _mdb_obj: try: - _mdb_obj = self.config.Mdblist.get_imdb(imdb_id) + _mdb_obj = self.config.MDBList.get_imdb(imdb_id) except LimitReached as err: logger.debug(err) except Failed as err: diff --git a/modules/overlays.py b/modules/overlays.py index cb42c048..26992018 100644 --- a/modules/overlays.py +++ b/modules/overlays.py @@ -296,10 +296,10 @@ def get_text(text_overlay): raise Failed("No Trakt User Rating Found") elif str(format_var).startswith("mdb"): mdb_item = None - if self.config.Mdblist.limit is False: + if self.config.MDBList.limit is False: if self.library.is_show and tvdb_id: try: - mdb_item = self.config.Mdblist.get_series(tvdb_id) + mdb_item = self.config.MDBList.get_series(tvdb_id) except LimitReached as err: logger.debug(err) except Failed as err: @@ -309,7 +309,7 @@ def get_text(text_overlay): raise if self.library.is_movie and tmdb_id: try: - mdb_item = self.config.Mdblist.get_movie(tmdb_id) + mdb_item = self.config.MDBList.get_movie(tmdb_id) except LimitReached as err: logger.debug(err) except Failed as err: @@ -319,7 +319,7 @@ def get_text(text_overlay): raise if imdb_id and not mdb_item: try: - mdb_item = self.config.Mdblist.get_imdb(imdb_id) + mdb_item = self.config.MDBList.get_imdb(imdb_id) except LimitReached as err: logger.debug(err) except Failed as err:
`mdb`Use MdbList for Content Ratings
`mdb_commonsense`Use Common Sense Rating through MDbList for Content Ratings
`mdb_commonsense0`Use Common Sense Rating with Zero Padding through MDbList for Content Ratings
`mdb_age_rating`Use MDbList Age Rating for Content Ratings
`mdb_age_rating0`Use MDbList Age Rating with Zero Padding for Content Ratings
`mdb`Use MDBList for Content Ratings
`mdb_commonsense`Use Common Sense Rating through MDBList for Content Ratings
`mdb_commonsense0`Use Common Sense Rating with Zero Padding through MDBList for Content Ratings
`mdb_age_rating`Use MDBList Age Rating for Content Ratings
`mdb_age_rating0`Use MDBList Age Rating with Zero Padding for Content Ratings
`omdb`Use IMDb through OMDb for Content Ratings
`mal`Use MyAnimeList for Content Ratings
`lock`Lock Content Rating Field
`tmdb`Use TMDb Release Date
`tvdb`Use TVDb Release Date
`omdb`Use IMDb Release Date through OMDb
`mdb`Use MdbList Release Date
`mdb_digital`Use MdbList Digital Release Date
`mdb`Use MDBList Release Date
`mdb_digital`Use MDBList Digital Release Date
`anidb`Use AniDB Release Date
`mal`Use MyAnimeList Release Date
`lock`Lock Originally Available Field
`imdb`Use IMDb Rating
`trakt_user`Use Trakt User's Personal Rating
`omdb`Use IMDbRating through OMDb
`mdb`Use MdbList Score
`mdb_average`Use MdbList Average Score
`mdb_imdb`Use IMDb Rating through MDbList
`mdb_metacritic`Use Metacritic Rating through MDbList
`mdb_metacriticuser`Use Metacritic User Rating through MDbList
`mdb_trakt`Use Trakt Rating through MDbList
`mdb_tomatoes`Use Rotten Tomatoes Rating through MDbList
`mdb_tomatoesaudience`Use Rotten Tomatoes Audience Rating through MDbList
`mdb_tmdb`Use TMDb Rating through MDbList
`mdb_letterboxd`Use Letterboxd Rating through MDbList
`mdb_myanimelist`Use MyAnimeList Rating through MDbList
`mdb`Use MDBList Score
`mdb_average`Use MDBList Average Score
`mdb_imdb`Use IMDb Rating through MDBList
`mdb_metacritic`Use Metacritic Rating through MDBList
`mdb_metacriticuser`Use Metacritic User Rating through MDBList
`mdb_trakt`Use Trakt Rating through MDBList
`mdb_tomatoes`Use Rotten Tomatoes Rating through MDBList
`mdb_tomatoesaudience`Use Rotten Tomatoes Audience Rating through MDBList
`mdb_tmdb`Use TMDb Rating through MDBList
`mdb_letterboxd`Use Letterboxd Rating through MDBList
`mdb_myanimelist`Use MyAnimeList Rating through MDBList
`anidb_rating`Use AniDB Rating
`anidb_average`Use AniDB Average
`anidb_score`Use AniDB Review Score