[8] small fixes

pull/909/head
meisnate12 2 years ago
parent 0e377fe474
commit c417d92cdf

@ -1 +1 @@
1.17.0-develop7
1.17.0-develop8

@ -67,6 +67,8 @@ Almost every default metadata file has a `collection_section` attribute. These a
Configs can be customized using the `template_variables` attribute when calling the file. These `template_variables` will be given to every template call in the file which allows them to affect how that file runs.
This example changes the ratings overlay to work on episodes.
```yaml
libraries:
TV Shows:
@ -122,6 +124,20 @@ libraries:
ending: current_year
```
Or maybe you want to change the number of actor collections made using PMM/actor.
```yaml
libraries:
Movies:
overlay_path:
- git: PMM/actor
template_variables:
collection_mode: hide
data:
depth: 5
limit: 50
```
## Errors
If there are collections being made that have configuration errors or missing posters please either bring it up in our Discord or raise an Issue on the [Configs Repo](https://github.com/meisnate12/Plex-Meta-Manager-Configs/issues/new/choose).

@ -590,7 +590,6 @@ class ConfigFile:
logger.separator(f"{display_name} Configuration")
logger.info("")
logger.info(f"Connecting to {display_name} Library...")
logger.info("")
params["asset_directory"] = check_for_attribute(lib, "asset_directory", parent="settings", var_type="list_path", default=self.general["asset_directory"], default_is_none=True, save=False)
params["asset_folders"] = check_for_attribute(lib, "asset_folders", parent="settings", var_type="bool", default=self.general["asset_folders"], do_print=False, save=False)
@ -803,7 +802,6 @@ class ConfigFile:
logger.info("")
logger.separator("Scanning Metadata and Overlay Files", space=False, border=False)
library.scan_files(self.operations_only, self.overlays_only, self.collection_only)
logger.info("")
if not library.metadata_files and not library.overlay_files and not library.library_operation and not self.playlist_files:
raise Failed("Config Error: No valid metadata files, overlay files, playlist files, or library operations found")
except Failed as e:

@ -270,7 +270,6 @@ class MetadataFile(DataFile):
else:
logger.info("")
logger.separator(f"Loading Metadata {file_type}: {path}")
logger.info("")
data = self.load_file(self.type, self.path)
self.metadata = get_dict("metadata", data, library.metadatas)
self.templates = get_dict("templates", data)

@ -314,10 +314,10 @@ def regex_first_int(data, id_type, default=None):
raise Failed(f"Regex Error: Failed to parse {id_type} from {data}")
def validate_filename(filename):
if is_valid_filename(filename):
if is_valid_filename(str(filename)):
return filename, None
else:
mapping_name = sanitize_filename(filename)
mapping_name = sanitize_filename(str(filename))
return mapping_name, f"Log Folder Name: {filename} is invalid using {mapping_name}"
def item_title(item):
@ -1015,8 +1015,8 @@ class Overlay:
self.updated = not image_compare or str(overlay_size) != str(image_compare)
try:
temp_image = Image.open(self.path).convert("RGBA")
self.image = self.get_overlay_image(temp_image, 1000, 1500)
self.landscape = self.get_overlay_image(temp_image, 1920, 1080)
self.image = self.get_overlay_image(temp_image, 1000, 1500) if self.has_coordinates() else temp_image
self.landscape = self.get_overlay_image(temp_image, 1920, 1080) if self.has_coordinates() else temp_image
if self.config.Cache:
self.config.Cache.update_image_map(self.name, f"{self.library.image_table_name}_overlays", self.name, overlay_size)
except OSError:

Loading…
Cancel
Save