fix music default template

This commit is contained in:
meisnate12 2022-01-31 15:59:36 -05:00
parent 0bfc9f05b9
commit 5cd45ef6ab
3 changed files with 4 additions and 6 deletions

View file

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

View file

@ -775,7 +775,6 @@ class ConfigFile:
logger.info("")
util.separator("Plex Configuration", space=False, border=False)
logger.info("")
params["plex"] = {
"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),
@ -795,8 +794,7 @@ class ConfigFile:
continue
try:
logger.info("")
util.separator("Scaning Metadata Files", space=False, border=False)
logger.info("")
util.separator("Scanning Metadata Files", space=False, border=False)
library.scan_metadata_files()
except Failed as e:
self.errors.append(e)

View file

@ -259,8 +259,8 @@ class MetadataFile(DataFile):
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}
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_title_format = "Top <<title>> <<library_type>>s"
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 = "Most Played <<title>> <<library_type>>s" if library.is_music else "Top <<title>> <<library_type>>s"
elif auto_type == "tmdb_collection":
auto_list = {}
items = library.get_all()