[21] update decade

This commit is contained in:
meisnate12 2022-11-15 16:30:46 -05:00
parent d0c2230cfc
commit a288eb3133
9 changed files with 9 additions and 29 deletions

View file

@ -1 +1 @@
1.18.0-develop20 1.18.0-develop21

View file

@ -25,7 +25,7 @@ collections:
dynamic_collections: dynamic_collections:
Decade: Decade:
type: decade type: decade
title_format: Best of <<key_name>>s title_format: Best of <<key_name>>
template: template:
- smart_filter - smart_filter
- translation - translation
@ -40,4 +40,4 @@ dynamic_collections:
image: image:
default: decade/best/<<key>> default: decade/best/<<key>>
translation_key: translation_key:
default: decade_show default: decade

View file

@ -447,10 +447,6 @@ translations:
decade_name: Bedste fra <<translated_key_name>> decade_name: Bedste fra <<translated_key_name>>
decade_summary: Top <<limit>> <<library_translation>> fra <<translated_key_name>>. decade_summary: Top <<limit>> <<library_translation>> fra <<translated_key_name>>.
# example key_name: 2010
decade_show_name: Bedste fra <<translated_key_name>>
decade_show_summary: Top <<limit>> <<library_translation>> fra <<translated_key_name>>.
# example key_name: Robin Williams # example key_name: Robin Williams
director_name: <<translated_key_name>> (Instruktør) director_name: <<translated_key_name>> (Instruktør)
director_summary: <<library_translationU>> instrueret af <<translated_key_name>>. director_summary: <<library_translationU>> instrueret af <<translated_key_name>>.

View file

@ -458,10 +458,6 @@ translations:
decade_name: Best of <<translated_key_name>> decade_name: Best of <<translated_key_name>>
decade_summary: Top <<limit>> <<library_translationU_plural>> der <<translated_key_name>>. decade_summary: Top <<limit>> <<library_translationU_plural>> der <<translated_key_name>>.
# Beispiel key_name: 2010
decade_show_name: Best of <<translated_key_name>>er
decade_show_summary: Top <<limit>> <<library_translationU_plural>> der <<translated_key_name>>er.
# Beispiel key_name: Robin Williams # Beispiel key_name: Robin Williams
director_name: <<translated_key_name>> (Regisseur) director_name: <<translated_key_name>> (Regisseur)
director_summary: <<library_translationU_plural>> mit Regie durch <<translated_key_name>>. director_summary: <<library_translationU_plural>> mit Regie durch <<translated_key_name>>.

View file

@ -447,10 +447,6 @@ translations:
decade_name: Best of <<translated_key_name>> decade_name: Best of <<translated_key_name>>
decade_summary: Top <<limit>> <<library_translation>>s of the <<translated_key_name>>. decade_summary: Top <<limit>> <<library_translation>>s of the <<translated_key_name>>.
# example key_name: 2010
decade_show_name: Best of <<translated_key_name>>s
decade_show_summary: Top <<limit>> <<library_translation>>s of the <<translated_key_name>>s.
# example key_name: Robin Williams # example key_name: Robin Williams
director_name: <<translated_key_name>> (Director) director_name: <<translated_key_name>> (Director)
director_summary: <<library_translationU>>s directed by <<translated_key_name>>. director_summary: <<library_translationU>>s directed by <<translated_key_name>>.

View file

@ -449,10 +449,6 @@ translations:
decade_name: Les meilleurs des années <<translated_key_name>> decade_name: Les meilleurs des années <<translated_key_name>>
decade_summary: Top <<limit>> des <<library_translation>>s des années <<translated_key_name>>. decade_summary: Top <<limit>> des <<library_translation>>s des années <<translated_key_name>>.
# example key_name: 2010
decade_show_name: Les meilleurs des années <<translated_key_name>>
decade_show_summary: Top <<limit>> des <<library_translation>>s des années <<translated_key_name>>.
# example key_name: Robin Williams # example key_name: Robin Williams
director_name: <<translated_key_name>> (Réalisateur) director_name: <<translated_key_name>> (Réalisateur)
director_summary: <<library_translationU>>s réalisés par <<translated_key_name>>. director_summary: <<library_translationU>>s réalisés par <<translated_key_name>>.

View file

@ -447,10 +447,6 @@ translations:
decade_name: Melhores de <<translated_key_name>> decade_name: Melhores de <<translated_key_name>>
decade_summary: Top <<limit>> <<library_translation>>s dos <<translated_key_name>>. decade_summary: Top <<limit>> <<library_translation>>s dos <<translated_key_name>>.
# example key_name: 2010
decade_show_name: Melhores de <<translated_key_name>>s
decade_show_summary: Top <<limit>> <<library_translation>>s dos <<translated_key_name>>s.
# example key_name: Robin Williams # example key_name: Robin Williams
director_name: <<translated_key_name>> (Diretor) director_name: <<translated_key_name>> (Diretor)
director_summary: <<library_translationU>>s dirigido por <<translated_key_name>>. director_summary: <<library_translationU>>s dirigido por <<translated_key_name>>.

View file

@ -2078,7 +2078,7 @@ class CollectionBuilder:
if self.details["show_options"]: if self.details["show_options"]:
error += f"\nOptions: {names}" error += f"\nOptions: {names}"
if validate: if validate:
raise Failed(error) raise FilterFailed(error)
elif not self.ignore_blank_results: elif not self.ignore_blank_results:
logger.error(error) logger.error(error)
return valid_list return valid_list

View file

@ -31,8 +31,8 @@ default_templates = {
"tmdb_collection": {"tmdb_collection_details": "<<value>>", "minimum_items": 2}, "tmdb_collection": {"tmdb_collection_details": "<<value>>", "minimum_items": 2},
"trakt_user_lists": {"trakt_list_details": "<<value>>"}, "trakt_user_lists": {"trakt_list_details": "<<value>>"},
"trakt_liked_lists": {"trakt_list_details": "<<value>>"}, "trakt_liked_lists": {"trakt_list_details": "<<value>>"},
"tmdb_popular_people": {"tmdb_person": f"<<value>>", "plex_search": {"all": {"actor": "tmdb"}}}, "tmdb_popular_people": {"tmdb_person": "<<value>>", "plex_search": {"all": {"actor": "tmdb"}}},
"trakt_people_list": {"tmdb_person": f"<<value>>", "plex_search": {"all": {"actor": "tmdb"}}} "trakt_people_list": {"tmdb_person": "<<value>>", "plex_search": {"all": {"actor": "tmdb"}}}
} }
def get_dict(attribute, attr_data, check_list=None, make_str=False): def get_dict(attribute, attr_data, check_list=None, make_str=False):
@ -649,7 +649,7 @@ class MetadataFile(DataFile):
addons[decade].append(item.year) addons[decade].append(item.year)
all_keys[str(item.year)] = str(item.year) all_keys[str(item.year)] = str(item.year)
auto_list = {str(k): f"{k}s" for k in addons if str(k) not in exclude and f"{k}s" not in exclude} auto_list = {str(k): f"{k}s" for k in addons if str(k) not in exclude and f"{k}s" not in exclude}
default_template = {"smart_filter": {"limit": 50, "sort_by": "critic_rating.desc", "any": {"year": f"<<value>>"}}} default_template = {"smart_filter": {"limit": 50, "sort_by": "critic_rating.desc", "any": {"year": "<<value>>"}}}
default_title_format = "Best <<library_type>>s of <<key_name>>" default_title_format = "Best <<library_type>>s of <<key_name>>"
elif auto_type in ["genre", "mood", "style", "album_style", "country", "studio", "edition", "network", "year", "decade", "content_rating", "subtitle_language", "audio_language", "resolution"]: elif auto_type in ["genre", "mood", "style", "album_style", "country", "studio", "edition", "network", "year", "decade", "content_rating", "subtitle_language", "audio_language", "resolution"]:
search_tag = auto_type_translation[auto_type] if auto_type in auto_type_translation else auto_type search_tag = auto_type_translation[auto_type] if auto_type in auto_type_translation else auto_type
@ -673,12 +673,12 @@ class MetadataFile(DataFile):
auto_list = {str(i.title): i.title for i in tags if str(i.title) not in exclude} auto_list = {str(i.title): i.title for i in tags if str(i.title) not in exclude}
if library.is_music: if library.is_music:
final_var = auto_type if auto_type.startswith("album") else f"artist_{auto_type}" final_var = auto_type if auto_type.startswith("album") else f"artist_{auto_type}"
default_template = {"smart_filter": {"limit": 50, "sort_by": "plays.desc", "any": {final_var: f"<<value>>"}}} default_template = {"smart_filter": {"limit": 50, "sort_by": "plays.desc", "any": {final_var: "<<value>>"}}}
if auto_type.startswith("album"): if auto_type.startswith("album"):
default_template["builder_level"] = "album" default_template["builder_level"] = "album"
default_title_format = f"Most Played <<key_name>> {'Albums' if auto_type.startswith('album') else '<<library_type>>'}s" default_title_format = f"Most Played <<key_name>> {'Albums' if auto_type.startswith('album') else '<<library_type>>'}s"
elif auto_type == "resolution": elif auto_type == "resolution":
default_template = {"smart_filter": {"sort_by": "title.asc", "any": {auto_type: f"<<value>>"}}} default_template = {"smart_filter": {"sort_by": "title.asc", "any": {auto_type: "<<value>>"}}}
default_title_format = "<<key_name>> <<library_type>>s" default_title_format = "<<key_name>> <<library_type>>s"
else: else:
default_template = {"smart_filter": {"limit": 50, "sort_by": "critic_rating.desc", "any": {f"{auto_type}.is" if auto_type == "studio" else auto_type: "<<value>>"}}} default_template = {"smart_filter": {"limit": 50, "sort_by": "critic_rating.desc", "any": {f"{auto_type}.is" if auto_type == "studio" else auto_type: "<<value>>"}}}