diff --git a/app/musicmuster.py b/app/musicmuster.py index da4d93e..32ef292 100755 --- a/app/musicmuster.py +++ b/app/musicmuster.py @@ -847,7 +847,7 @@ class Window(QMainWindow): items = getattr(self, f"get_{key}_items")() for item in items: # Check for separator - if "separator" in item and item["separator"] == "separator": + if "separator" in item and item["separator"]: submenu.addSeparator() continue action = QAction(item["text"], self) @@ -865,7 +865,7 @@ class Window(QMainWindow): def get_new_playlist_dynamic_submenu_items( self, - ) -> list[dict[str, str | tuple[Session, int]]]: + ) -> list[dict[str, str | tuple[Session, int] | bool]]: """ Return dynamically generated menu items, in this case templates marked as favourite from which to generate a @@ -876,14 +876,14 @@ class Window(QMainWindow): """ with db.Session() as session: - submenu_items: list[dict[str, str | tuple[Session, int]]] = [ + submenu_items: list[dict[str, str | tuple[Session, int] | bool]] = [ { "text": "Show all", "handler": "create_playlist_from_template", "args": (session, 0), }, { - "separator": "separator", + "separator": True, } ] templates = Playlists.get_favourite_templates(session)