From 5cd45ef6abd3f40fcf6d2dcb3e528e38ab9bce1a Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Mon, 31 Jan 2022 15:59:36 -0500 Subject: [PATCH] fix music default template --- VERSION | 2 +- modules/config.py | 4 +--- modules/meta.py | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/VERSION b/VERSION index d2824735..e0b5528d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.15.1-develop27 +1.15.1-develop28 diff --git a/modules/config.py b/modules/config.py index cab8cc4c..c8e88604 100644 --- a/modules/config.py +++ b/modules/config.py @@ -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) diff --git a/modules/meta.py b/modules/meta.py index 4ab5021c..d1feab89 100644 --- a/modules/meta.py +++ b/modules/meta.py @@ -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 <> <<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()