[5] Formula One update

pull/1818/head
meisnate12 11 months ago
parent 9ce55cc11e
commit 971c9ba2f8

@ -9,6 +9,6 @@ Updated lxml requirement to 5.1.0
# Bug Fixes # Bug Fixes
Fixed the Rate Limit on MDbList calls Fixed the Rate Limit on MDbList calls
Fixed collection fields being locked during batch edits when they shouldn't be. Fixed collection fields being locked during batch edits when they shouldn't be
Various other Minor Fixes Various other Minor Fixes

@ -46,7 +46,7 @@ Here are some examples of the things you can achieve using Plex Meta Manager!
![Movie Collection Preview](https://metamanager.wiki/en/latest/images/movie-collection-preview.png) ![Movie Collection Preview](https://metamanager.wiki/en/latest/images/movie-collection-preview.png)
**Example Show Overlays using the [Plex Meta Manager Defaults](https://metamanager.wiki/en/latest/defaults/collections/overlays)** (click to enlarge): **Example Show Overlays using the [Plex Meta Manager Defaults](https://metamanager.wiki/en/latest/defaults/overalys)** (click to enlarge):
![Show Library Preview](https://metamanager.wiki/en/latest/images/show-library-preview.png) ![Show Library Preview](https://metamanager.wiki/en/latest/images/show-library-preview.png)

@ -1 +1 @@
1.20.0-develop4 1.20.0-develop5

@ -3171,7 +3171,7 @@ class CollectionBuilder:
if summary[1]: if summary[1]:
if str(summary[1]) != str(self.obj.summary): if str(summary[1]) != str(self.obj.summary):
try: try:
self.obj.edit(summary=str(summary[1])) self.obj.editSummary(str(summary[1]))
logger.info(f"Summary ({summary[0]}) | {summary[1]:<25}") logger.info(f"Summary ({summary[0]}) | {summary[1]:<25}")
logger.info("Metadata: Update Completed") logger.info("Metadata: Update Completed")
updated_details.append("Metadata") updated_details.append("Metadata")

@ -75,6 +75,9 @@ class Race:
except (ValueError, TypeError): except (ValueError, TypeError):
self.date = None self.date = None
def __str__(self):
return f"Season {self.season} Round {self.round}: {self.name}"
def format_name(self, round_prefix, shorten_gp): def format_name(self, round_prefix, shorten_gp):
if self._language: if self._language:
output = f"GP {self.name.replace(' Grand Prix', '')}" if shorten_gp else self.name output = f"GP {self.name.replace(' Grand Prix', '')}" if shorten_gp else self.name

@ -1856,7 +1856,8 @@ class MetadataFile(DataFile):
asset_location, folder_name, ups = self.library.item_images(item, meta, methods, initial=True, asset_directory=self.asset_directory + self.library.asset_directory if self.asset_directory else None, style_data=style_data) asset_location, folder_name, ups = self.library.item_images(item, meta, methods, initial=True, asset_directory=self.asset_directory + self.library.asset_directory if self.asset_directory else None, style_data=style_data)
if ups: if ups:
updated = True updated = True
logger.info(f"{self.library.type}: {mapping_name} Metadata Update {'Complete' if updated else 'Not Needed'}") if "f1_season" not in methods:
logger.info(f"{self.library.type}: {mapping_name} Metadata Update {'Complete' if updated else 'Not Needed'}")
update_seasons = self.update_seasons update_seasons = self.update_seasons
if "update_seasons" in methods and self.library.is_show: if "update_seasons" in methods and self.library.is_show:
@ -2130,9 +2131,10 @@ class MetadataFile(DataFile):
f1_language = str(meta[methods["f1_language"]]).lower() f1_language = str(meta[methods["f1_language"]]).lower()
else: else:
logger.error(f"{self.type_str} Error: f1_language must be a language code PMM has a translation for. Options: {ergast.translations}") logger.error(f"{self.type_str} Error: f1_language must be a language code PMM has a translation for. Options: {ergast.translations}")
logger.info(f"Setting {self.type_str} of {item.title} to F1 Season {f1_season}") logger.info(f"Setting {item.title} of {self.type_str} to F1 Season {f1_season}")
races = self.config.Ergast.get_races(f1_season, f1_language) races = self.config.Ergast.get_races(f1_season, f1_language)
race_lookup = {r.round: r for r in races} race_lookup = {r.round: r for r in races}
logger.trace(race_lookup)
for season in item.seasons(): for season in item.seasons():
if not season.seasonNumber: if not season.seasonNumber:
continue continue

Loading…
Cancel
Save