[127] #1014 Fix metadata assets

This commit is contained in:
meisnate12 2022-10-17 15:30:27 -04:00
parent 04e5f49903
commit 19216f8c9c
4 changed files with 13 additions and 7 deletions

View file

@ -1 +1 @@
1.17.3-develop126
1.17.3-develop127

View file

@ -3,6 +3,7 @@
The script is designed to run continuously and certain attributes can be scheduled using these attributes.
Below is an example of a scheduled library:
```yaml
libraries:
Movies:
@ -17,7 +18,10 @@ libraries:
mass_critic_rating_update: tmdb
```
Below is an example of a scheduled Metadata File, Overlay File, and Playlist File:
Below is an example of scheduling Metadata Files, Playlist Files, and Overlay Files:
**Note: Overlay Files cannot be individually Scheduled.**
```yaml
libraries:
Movies:
@ -37,14 +41,15 @@ libraries:
- pmm: audio_codec
- pmm: resolution
- pmm: video_format
operations:
mass_critic_rating_update: tmdb
playlist_files:
- file: config/Playlists.yml
schedule: weekly(sunday)
- file: config/Playlists2.yml
schedule: weekly(monday)
```
Below is an example of a scheduled collection:
```yaml
collections:
TMDb Trending Weekly:
@ -60,6 +65,7 @@ collections:
```
Below is an example of a scheduled pinning collection:
```yaml
collections:
Christmas Movies:

View file

@ -1195,7 +1195,7 @@ class MetadataFile(DataFile):
logger.info(f"{self.library.type}: {mapping_name} Details Update {'Complete' if updated else 'Not Needed'}")
asset_location, folder_name = self.library.item_images(item, meta, methods)
asset_location, folder_name = self.library.item_images(item, meta, methods, initial=True, asset_location=self.asset_directory if self.asset_directory else None)
if "seasons" in methods and self.library.is_show:
if not meta[methods["seasons"]]:

View file

@ -1029,7 +1029,7 @@ class Plex(Library):
logger.info(final)
return final[28:] if final else final
def item_images(self, item, group, alias, asset_location=None, title=None, image_name=None, folder_name=None):
def item_images(self, item, group, alias, initial=False, asset_location=None, title=None, image_name=None, folder_name=None):
if title is None:
title = item.title
posters, backgrounds = util.get_image_dicts(group, alias)
@ -1039,7 +1039,7 @@ class Plex(Library):
posters["asset_directory"] = asset_poster
if asset_background:
backgrounds["asset_directory"] = asset_background
if asset_location is None:
if asset_location is None or initial:
asset_location = item_dir
except Failed as e:
logger.warning(e)