fix music default template

pull/682/head
meisnate12 3 years ago
parent 0bfc9f05b9
commit 5cd45ef6ab

@ -1 +1 @@
1.15.1-develop27 1.15.1-develop28

@ -775,7 +775,6 @@ class ConfigFile:
logger.info("") logger.info("")
util.separator("Plex Configuration", space=False, border=False) util.separator("Plex Configuration", space=False, border=False)
logger.info("")
params["plex"] = { params["plex"] = {
"url": check_for_attribute(lib, "url", parent="plex", var_type="url", default=self.general["plex"]["url"], req_default=True, save=False), "url": check_for_attribute(lib, "url", parent="plex", var_type="url", default=self.general["plex"]["url"], req_default=True, save=False),
"token": check_for_attribute(lib, "token", parent="plex", default=self.general["plex"]["token"], req_default=True, save=False), "token": check_for_attribute(lib, "token", parent="plex", default=self.general["plex"]["token"], req_default=True, save=False),
@ -795,8 +794,7 @@ class ConfigFile:
continue continue
try: try:
logger.info("") logger.info("")
util.separator("Scaning Metadata Files", space=False, border=False) util.separator("Scanning Metadata Files", space=False, border=False)
logger.info("")
library.scan_metadata_files() library.scan_metadata_files()
except Failed as e: except Failed as e:
self.errors.append(e) self.errors.append(e)

@ -259,8 +259,8 @@ class MetadataFile(DataFile):
if auto_type in ["genre", "mood", "style", "country", "network"]: if auto_type in ["genre", "mood", "style", "country", "network"]:
auto_list = {i.title: i.title for i in library.get_tags(auto_type) if i.title not in exclude} auto_list = {i.title: i.title for i in library.get_tags(auto_type) if i.title not in exclude}
use_filter = f"artist_{auto_type}" if library.is_music else auto_type use_filter = f"artist_{auto_type}" if library.is_music else auto_type
default_template = {"smart_filter": {"limit": 50, "sort_by": "critic_rating.desc", "all": {use_filter: f"<<{auto_type}>>"}}} default_template = {"smart_filter": {"limit": 50, "sort_by": "plays.desc" if library.is_music else "critic_rating.desc", "all": {use_filter: f"<<{auto_type}>>"}}}
default_title_format = "Top <<title>> <<library_type>>s" default_title_format = "Most Played <<title>> <<library_type>>s" if library.is_music else "Top <<title>> <<library_type>>s"
elif auto_type == "tmdb_collection": elif auto_type == "tmdb_collection":
auto_list = {} auto_list = {}
items = library.get_all() items = library.get_all()

Loading…
Cancel
Save