[51] add labels to seasons and episodes

pull/858/head
meisnate12 3 years ago
parent c40b6e418f
commit 16be7a9d70

@ -1 +1 @@
1.16.5-develop50
1.16.5-develop51

@ -8,7 +8,7 @@ Smart Builders allow Plex Meta Manager to create Smart Collections in two differ
A Smart Label Collection is a smart collection that grabs every item with a specific label generated by the program. That label is added to all the items the Collection Builders find instead of being added to a normal collection.
To make a collection a Smart Label Collection,the `smart_label` attribute must added to the collection definition. It functions in two different ways:
To make a collection a Smart Label Collection, the `smart_label` attribute must added to the collection definition. It functions in two different ways:
1. Define the sort using the Movies/Shows column of the [Sorts Table](#sort-options) below along with any other builder to make that collection a Smart Label Collection.
```yaml

@ -90,7 +90,7 @@ You can add `.sync` to any tag attribute to sync all tags vs just appending the
|:-----------------|:--------------------------------------------------------|:--------:|:--------:|:--------:|
| `genre` | List or comma-separated text of each Genre Tag | ✅ | ✅ | ❌ |
| `collection` | List or comma-separated text of each Collection Tag | ✅ | ✅ | ✅ |
| `label` | List or comma-separated text of each Label Tag | ❌ | ✅ | ❌ |
| `label` | List or comma-separated text of each Label Tag | ✅ | ✅ | ✅ |
| `style` | List or comma-separated text of each Style Tag | ✅ | ✅ | ❌ |
| `mood` | List or comma-separated text of each Mood Tag | ✅ | ✅ | ✅ |
| `country` | List or comma-separated text of each Country Tag | ✅ | ❌ | ❌ |

@ -119,8 +119,8 @@ You can add `.sync` to any tag attribute to sync all tags vs just appending the
| `director` | List or comma-separated text of each Director Tag | ❌ | ❌ | ✅ |
| `genre` | List or comma-separated text of each Genre Tag | ✅ | ❌ | ❌ |
| `writer` | List or comma-separated text of each Writer Tag | ❌ | ❌ | ✅ |
| `collection` | List or comma-separated text of each Collection Tag | ✅ | ❌ | ❌ |
| `label` | List or comma-separated text of each Label Tag | ✅ | ❌ | ❌ |
| `collection` | List or comma-separated text of each Collection Tag | ✅ | ✅ | ✅ |
| `label` | List or comma-separated text of each Label Tag | ✅ | ✅ | ✅ |
### Image Attributes
@ -128,8 +128,8 @@ You can add `.sync` to any tag attribute to sync all tags vs just appending the
|:------------------|:------------------------------------------------|:-------:|:-------:|:--------:|
| `url_poster` | URL of image publicly available on the internet | ✅ | ✅ | ✅ |
| `file_poster` | Path to image in the file system | ✅ | ✅ | ✅ |
| `url_background` | URL of image publicly available on the internet | ✅ | ✅ | ❌ |
| `file_background` | Path to image in the file system | ✅ | ✅ | ❌ |
| `url_background` | URL of image publicly available on the internet | ✅ | ✅ | ✅ |
| `file_background` | Path to image in the file system | ✅ | ✅ | ✅ |
### Advanced Attributes

@ -147,7 +147,7 @@ parts_collection_valid = [
"filters", "plex_all", "plex_search", "trakt_list", "trakt_list_details", "collection_filtering", "collection_mode", "label", "visible_library", "limit",
"visible_home", "visible_shared", "show_missing", "save_missing", "missing_only_released", "server_preroll", "changes_webhooks",
"item_lock_background", "item_lock_poster", "item_lock_title", "item_refresh", "item_refresh_delay", "imdb_list", "cache_builders",
"url_theme", "file_theme"
"url_theme", "file_theme", "item_label"
] + episode_parts_only + summary_details + poster_details + background_details + string_details
playlist_attributes = [
"filters", "name_mapping", "show_filtered", "show_missing", "save_missing",

@ -883,6 +883,8 @@ class MetadataFile(DataFile):
add_edit("title", season, season_dict, season_methods)
add_edit("summary", season, season_dict, season_methods)
add_edit("user_rating", season, season_dict, season_methods, key="userRating", var_type="float")
if self.edit_tags("label", season, season_dict, season_methods):
updated = True
finish_edit(season, f"Season: {season_id}")
self.set_images(season, season_dict, season_methods)
logger.info(f"Season {season_id} of {mapping_name} Details Update {'Complete' if updated else 'Not Needed'}")
@ -915,7 +917,7 @@ class MetadataFile(DataFile):
add_edit("user_rating", episode, episode_dict, episode_methods, key="userRating", var_type="float")
add_edit("originally_available", episode, episode_dict, episode_methods, key="originallyAvailableAt", var_type="date")
add_edit("summary", episode, episode_dict, episode_methods)
for tag_edit in ["director", "writer"]:
for tag_edit in ["director", "writer", "label"]:
if self.edit_tags(tag_edit, episode, episode_dict, episode_methods):
updated = True
finish_edit(episode, f"Episode: {episode_str} in Season: {season_id}")
@ -953,7 +955,7 @@ class MetadataFile(DataFile):
add_edit("user_rating", episode, episode_dict, episode_methods, key="userRating", var_type="float")
add_edit("originally_available", episode, episode_dict, episode_methods, key="originallyAvailableAt", var_type="date")
add_edit("summary", episode, episode_dict, episode_methods)
for tag_edit in ["director", "writer"]:
for tag_edit in ["director", "writer", "label"]:
if self.edit_tags(tag_edit, episode, episode_dict, episode_methods):
updated = True
finish_edit(episode, f"Episode: {episode_str} in Season: {season_id}")
@ -1031,7 +1033,8 @@ class MetadataFile(DataFile):
add_edit("track", track, track_dict, track_methods, key="index", var_type="int")
add_edit("disc", track, track_dict, track_methods, key="parentIndex", var_type="int")
add_edit("original_artist", track, track_dict, track_methods, key="originalTitle")
if self.edit_tags("mood", track, track_dict, track_methods):
for tag_edit in ["mood", "collection", "label"]:
if self.edit_tags(tag_edit, track, track_dict, track_methods):
updated = True
finish_edit(track, f"Track: {title}")
logger.info(f"Track: {track_num} on Album: {title} of {mapping_name} Details Update {'Complete' if updated else 'Not Needed'}")

@ -74,7 +74,7 @@ advance_tags_to_edit = {
tags_to_edit = {
"Movie": ["genre", "label", "collection", "country", "director", "producer", "writer"],
"Show": ["genre", "label", "collection"],
"Artist": ["genre", "style", "mood", "country", "collection", "similar_artist"]
"Artist": ["genre", "label", "style", "mood", "country", "collection", "similar_artist"]
}
mdb_types = ["mdb", "mdb_imdb", "mdb_metacritic", "mdb_metacriticuser", "mdb_trakt", "mdb_tomatoes", "mdb_tomatoesaudience", "mdb_tmdb", "mdb_letterboxd"]
collection_mode_options = {

Loading…
Cancel
Save