From 63fdaf3cff9cae4d3f873be512430ce0e036a9ba Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Thu, 17 Aug 2023 09:48:05 -0400 Subject: [PATCH] [96] small fixes --- VERSION | 2 +- defaults/movie/continent.yml | 8 +++----- defaults/movie/country.yml | 3 ++- defaults/movie/region.yml | 7 ++----- defaults/show/continent.yml | 6 +++--- defaults/show/country.yml | 1 + defaults/show/region.yml | 6 +++--- docs/defaults/movie/country.md | 2 +- docs/metadata/builders/letterboxd.md | 2 +- modules/meta.py | 16 +++++++--------- modules/operations.py | 14 ++++++++------ requirements.txt | 2 +- 12 files changed, 33 insertions(+), 36 deletions(-) diff --git a/VERSION b/VERSION index c0d678ac..e0b25950 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.19.0-develop95 +1.19.0-develop96 diff --git a/defaults/movie/continent.yml b/defaults/movie/continent.yml index 2fa32d40..7ac7011d 100644 --- a/defaults/movie/continent.yml +++ b/defaults/movie/continent.yml @@ -1,9 +1,9 @@ ############################################################################## -# Continent Collections # +# Continent Collections # # Created by Adam Pope, bartolomesorianol, Bullmoose20 & Sohjiro # -# Artwork Credit to Duhniel, Bullmoose20, and Wiki Commons # +# Artwork Credit to Duhniel, Bullmoose20, and Wiki Commons # # EDITING THIS FILE MAY CAUSE PULLING NEW UPDATES TO FAIL # -# https://metamanager.wiki/en/latest/defaults/movie/continent.html # +# https://metamanager.wiki/en/latest/defaults/movie/continent.html # ############################################################################## external_templates: @@ -214,8 +214,6 @@ dynamic_collections: - St. Pierre and Miquelon # Saint Pierre and Miquelon - United States - United States of America # United States - Antarctica: - - Antarctica Asia: # Central Asia: - Kazakhstan diff --git a/defaults/movie/country.yml b/defaults/movie/country.yml index 86e26ff7..3f1bb8f6 100644 --- a/defaults/movie/country.yml +++ b/defaults/movie/country.yml @@ -43,6 +43,7 @@ dynamic_collections: other: country_other dynamic: default: true + include: # Northern Africa: - Algeria @@ -205,7 +206,7 @@ dynamic_collections: - Bangladesh - Bhutan - India - - Islamic Republic of Iran + - Iran - Maldives - Nepal - Pakistan diff --git a/defaults/movie/region.yml b/defaults/movie/region.yml index e8fe3aea..3873994e 100644 --- a/defaults/movie/region.yml +++ b/defaults/movie/region.yml @@ -1,7 +1,7 @@ ############################################################################## -# Region Collections # +# Region Collections # # Created by Adam Pope, bartolomesorianol, Bullmoose20 & Sohjiro # -# Artwork Credit to Duhniel, Bullmoose20, and Wiki Commons # +# Artwork Credit to Duhniel, Bullmoose20, and Wiki Commons # # EDITING THIS FILE MAY CAUSE PULLING NEW UPDATES TO FAIL # # https://metamanager.wiki/en/latest/defaults/movie/region.html # ############################################################################## @@ -229,8 +229,6 @@ dynamic_collections: - St. Pierre and Miquelon # Saint Pierre and Miquelon - United States - United States of America # United States - Antarctica: - - Antarctica Central Asia: - Kazakhstan - Kyrgyzstan @@ -394,7 +392,6 @@ dynamic_collections: - Guam - Kiribati - Marshall Islands - - Micronesia - Federated States of Micronesia # Micronesia - Nauru - Northern Mariana Islands diff --git a/defaults/show/continent.yml b/defaults/show/continent.yml index 01c88cda..71fcb0d2 100644 --- a/defaults/show/continent.yml +++ b/defaults/show/continent.yml @@ -1,9 +1,9 @@ ############################################################################## -# Continent Collections # +# Continent Collections # # Created by Adam Pope, bartolomesorianol, Bullmoose20 & Sohjiro # -# Artwork Credit to Duhniel, Bullmoose20, and Wiki Commons # +# Artwork Credit to Duhniel, Bullmoose20, and Wiki Commons # # EDITING THIS FILE MAY CAUSE PULLING NEW UPDATES TO FAIL # -# https://metamanager.wiki/en/latest/defaults/show/continent.html # +# https://metamanager.wiki/en/latest/defaults/show/continent.html # ############################################################################## external_templates: diff --git a/defaults/show/country.yml b/defaults/show/country.yml index ee2c2ec0..966f8e65 100644 --- a/defaults/show/country.yml +++ b/defaults/show/country.yml @@ -43,6 +43,7 @@ dynamic_collections: other: country_other dynamic: default: true + include: # Northern Africa: - dz # Algeria diff --git a/defaults/show/region.yml b/defaults/show/region.yml index 64dc0120..7bf2541b 100644 --- a/defaults/show/region.yml +++ b/defaults/show/region.yml @@ -1,9 +1,9 @@ ############################################################################## -# Region Collections # +# Region Collections # # Created by Adam Pope, bartolomesorianol, Bullmoose20 & Sohjiro # -# Artwork Credit to Duhniel, Bullmoose20, and Wiki Commons # +# Artwork Credit to Duhniel, Bullmoose20, and Wiki Commons # # EDITING THIS FILE MAY CAUSE PULLING NEW UPDATES TO FAIL # -# https://metamanager.wiki/en/latest/defaults/show/region.html # +# https://metamanager.wiki/en/latest/defaults/show/region.html # ############################################################################## external_templates: diff --git a/docs/defaults/movie/country.md b/docs/defaults/movie/country.md index a9d85ad9..36e17876 100644 --- a/docs/defaults/movie/country.md +++ b/docs/defaults/movie/country.md @@ -250,7 +250,7 @@ These are lists provided for reference to show what values will be in use if you - Bangladesh - Bhutan - India - - Islamic Republic of Iran + - Iran - Maldives - Nepal - Pakistan diff --git a/docs/metadata/builders/letterboxd.md b/docs/metadata/builders/letterboxd.md index 89b662f5..5dd72d38 100644 --- a/docs/metadata/builders/letterboxd.md +++ b/docs/metadata/builders/letterboxd.md @@ -47,7 +47,7 @@ You can add different filters directly to this builder. | `year`1 | **Description:** Search for the specified year range.
**Values:** range of int i.e. `1990-1999` | | `note`1 | **Description:** Search for the specified value in the note. The note is the list owner's note not sitewide note.
**Values:** Any String | -1 These filters only work if the URL is to the List View of the Letterboxd list. +1 These filters only work if the URL is to the List View of the Letterboxd list. (i.e. it should have `/detail/` in the url) ```yaml collections: diff --git a/modules/meta.py b/modules/meta.py index ca12907d..7dd0eab0 100644 --- a/modules/meta.py +++ b/modules/meta.py @@ -1480,17 +1480,15 @@ class MetadataFile(DataFile): logger.info("") logger.info(f"{id_type} ID Mapping: {mapping_id}") if self.library.is_movie and mapping_id in self.library.movie_map: - for item_id in self.library.movie_map[mapping_id]: - item.append(self.library.fetch_item(item_id)) + item.extend([self.library.fetch_item(i) for i in self.library.movie_map[mapping_id]]) elif self.library.is_show and mapping_id in self.library.show_map: - for item_id in self.library.show_map[mapping_id]: - item.append(self.library.fetch_item(item_id)) + item.extend([self.library.fetch_item(i) for i in self.library.show_map[mapping_id]]) elif mapping_id in self.library.imdb_map: - for item_id in self.library.imdb_map[mapping_id]: - item.append(self.library.fetch_item(item_id)) + item.extend([self.library.fetch_item(i) for i in self.library.imdb_map[mapping_id]]) else: logger.error(f"{self.type_str} Error: {id_type} ID not mapped") continue + title = mapping_name if mapping_id is None else None blank_edition = False edition_titles = [] @@ -1598,7 +1596,7 @@ class MetadataFile(DataFile): logger.info("") logger.separator(f"Updating {i.title}", space=False, border=False) logger.info("") - self.update_metadata_item(i, mapping_name, meta, methods) + self.update_metadata_item(i, mapping_name, meta, methods, title=title) except Failed as e: logger.error(e) except NotScheduled as e: @@ -1606,7 +1604,7 @@ class MetadataFile(DataFile): except Failed as e: logger.error(e) - def update_metadata_item(self, item, mapping_name, meta, methods): + def update_metadata_item(self, item, mapping_name, meta, methods, title=None): updated = False @@ -1703,7 +1701,7 @@ class MetadataFile(DataFile): genres = tmdb_item.genres #item.batchEdits() - add_edit("title", item, meta, methods) + add_edit("title", item, meta, methods, value=title) add_edit("sort_title", item, meta, methods, key="titleSort") if self.library.is_movie: if "edition" in methods and not self.library.plex_pass: diff --git a/modules/operations.py b/modules/operations.py index e5b1d294..d0b12a05 100644 --- a/modules/operations.py +++ b/modules/operations.py @@ -512,9 +512,9 @@ class Operations: new_poster = None new_background = None if self.library.mass_poster_update: - self.library.poster_update(item, new_poster, tmdb=tmdb_item.poster_url if tmdb_item else None) + self.library.poster_update(item, new_poster, tmdb=tmdb_item.poster_url if tmdb_item else None, title=item.title) if self.library.mass_background_update: - self.library.background_update(item, new_background, tmdb=tmdb_item.backdrop_url if tmdb_item else None) + self.library.background_update(item, new_background, tmdb=tmdb_item.backdrop_url if tmdb_item else None, title=item.title) if self.library.is_show and ( (self.library.mass_poster_update and @@ -536,11 +536,12 @@ class Operations: except Failed: season_poster = None season_background = None + season_title = f"S{season.seasonNumber} {season.title}" tmdb_poster = tmdb_seasons[season.seasonNumber].poster_url if season.seasonNumber in tmdb_seasons else None if self.library.mass_poster_update: - self.library.poster_update(season, season_poster, tmdb=tmdb_poster, title=season.title if season else None) + self.library.poster_update(season, season_poster, tmdb=tmdb_poster, title=season_title if season else None) if self.library.mass_background_update: - self.library.background_update(season, season_background, title=season.title if season else None) + self.library.background_update(season, season_background, title=season_title if season else None) if (self.library.mass_poster_update and self.library.mass_poster_update["episodes"]) or \ (self.library.mass_background_update and self.library.mass_background_update["episodes"]): @@ -559,11 +560,12 @@ class Operations: except Failed: episode_poster = None episode_background = None + episode_title = f"S{season.seasonNumber}E{episode.episodeNumber} {episode.title}" tmdb_poster = tmdb_episodes[episode.episodeNumber].still_url if episode.episodeNumber in tmdb_episodes else None if self.library.mass_poster_update: - self.library.poster_update(episode, episode_poster, tmdb=tmdb_poster, title=episode.title if episode else None) + self.library.poster_update(episode, episode_poster, tmdb=tmdb_poster, title=episode_title if episode else None) if self.library.mass_background_update: - self.library.background_update(episode, episode_background, title=episode.title if episode else None) + self.library.background_update(episode, episode_background, title=episode_title if episode else None) episode_ops = [ self.library.mass_episode_audience_rating_update, self.library.mass_episode_critic_rating_update, diff --git a/requirements.txt b/requirements.txt index d48f0f47..b8a17dcf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -arrapi==1.4.2 +arrapi==1.4.3 GitPython==3.1.32 lxml==4.9.3 num2words==0.5.12