Skip to content

Commit

Permalink
[6] Kometa-Team#979 startswith fix
Browse files Browse the repository at this point in the history
  • Loading branch information
meisnate12 committed Jul 23, 2022
1 parent 29f23d3 commit 9132b6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.17.2-develop5
1.17.2-develop6
6 changes: 3 additions & 3 deletions modules/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,11 +492,11 @@ def _check_dict(check_dict):
all_keys = [str(i.title) for i in tags]
auto_list = {str(i.title): i.title for i in tags if str(i.title) not in exclude}
if library.is_music:
final_var = auto_type if auto_type.startwith("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>>"}}}
if auto_type.startwith("album"):
if auto_type.startswith("album"):
default_template["collection_level"] = "album"
default_title_format = f"Most Played <<key_name>> {'Albums' if auto_type.startwith('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":
default_template = {"smart_filter": {"sort_by": "title.asc", "any": {auto_type: f"<<value>>"}}}
default_title_format = "<<key_name>> <<library_type>>s"
Expand Down

0 comments on commit 9132b6a

Please sign in to comment.