Skip to content

Commit

Permalink
[5] Formula One update
Browse files Browse the repository at this point in the history
  • Loading branch information
meisnate12 committed Jan 10, 2024
1 parent 9ce55cc commit 971c9ba
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ Updated lxml requirement to 5.1.0

# Bug Fixes
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

**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)

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.20.0-develop4
1.20.0-develop5
2 changes: 1 addition & 1 deletion modules/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -3171,7 +3171,7 @@ def update_details(self):
if summary[1]:
if str(summary[1]) != str(self.obj.summary):
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("Metadata: Update Completed")
updated_details.append("Metadata")
Expand Down
3 changes: 3 additions & 0 deletions modules/ergast.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ def __init__(self, data, language):
except (ValueError, TypeError):
self.date = None

def __str__(self):
return f"Season {self.season} Round {self.round}: {self.name}"

def format_name(self, round_prefix, shorten_gp):
if self._language:
output = f"GP {self.name.replace(' Grand Prix', '')}" if shorten_gp else self.name
Expand Down
6 changes: 4 additions & 2 deletions modules/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -1856,7 +1856,8 @@ def finish_edit(current_item, description):
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:
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
if "update_seasons" in methods and self.library.is_show:
Expand Down Expand Up @@ -2130,9 +2131,10 @@ def finish_edit(current_item, description):
f1_language = str(meta[methods["f1_language"]]).lower()
else:
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)
race_lookup = {r.round: r for r in races}
logger.trace(race_lookup)
for season in item.seasons():
if not season.seasonNumber:
continue
Expand Down

0 comments on commit 971c9ba

Please sign in to comment.