Skip to content
Snippets Groups Projects
Commit 5e1f1190 authored by dos's avatar dos Committed by pippin
Browse files

py,st3m: Add "Media" and "Games" as app categories

parent c5543dc6
Branches
No related tags found
No related merge requests found
[app] [app]
name = "Audio Passthrough" name = "Audio Passthrough"
menu = "Apps" menu = "Media"
[entry] [entry]
class = "AudioPassthrough" class = "AudioPassthrough"
......
[app] [app]
name = "Wurzelitzer" name = "Wurzelitzer"
menu = "Music" menu = "Media"
wifi_preference = true wifi_preference = true
[metadata] [metadata]
......
...@@ -97,8 +97,8 @@ class BundleMetadata: ...@@ -97,8 +97,8 @@ class BundleMetadata:
[app] [app]
# Required, displayed in the menu. # Required, displayed in the menu.
name = "Name of the application" name = "Name of the application"
# One of "Apps", "Badge", "Music". Picks which menu the bundle's class # One of "Apps", "Badge", "Music", "Games", "Media". Picks which menu
# will be loadable from. # the bundle's class will be loadable from.
menu = "Apps" menu = "Apps"
[entry] [entry]
...@@ -147,8 +147,10 @@ class BundleMetadata: ...@@ -147,8 +147,10 @@ class BundleMetadata:
if "menu" not in app or type(app["menu"]) != str: if "menu" not in app or type(app["menu"]) != str:
raise BundleMetadataBroken("missing app.menu key") raise BundleMetadataBroken("missing app.menu key")
self.menu = app["menu"] self.menu = app["menu"]
if self.menu not in ["Apps", "Music", "Badge", "Hidden"]: if self.menu not in ["Apps", "Music", "Badge", "Games", "Media", "Hidden"]:
raise BundleMetadataBroken("app.menu must be either Apps, Music or Badge") raise BundleMetadataBroken(
"app.menu must be either Apps, Music, Badge, Games or Media"
)
version = 0 version = 0
if t.get("metadata") is not None: if t.get("metadata") is not None:
...@@ -218,7 +220,7 @@ class BundleMetadata: ...@@ -218,7 +220,7 @@ class BundleMetadata:
""" """
Returns MenuItemAppLauch entries for this bundle for a given menu kind. Returns MenuItemAppLauch entries for this bundle for a given menu kind.
Kind is one of 'Apps', 'Badge', 'Music'. Kind is one of 'Apps', 'Badge', 'Music', 'Games', 'Media'.
""" """
if self.menu != kind: if self.menu != kind:
return [] return []
......
...@@ -247,6 +247,8 @@ def run_main() -> None: ...@@ -247,6 +247,8 @@ def run_main() -> None:
[ [
MenuItemForeground("Badge", _make_bundle_menu(bundles, "Badge")), MenuItemForeground("Badge", _make_bundle_menu(bundles, "Badge")),
MenuItemForeground("Music", _make_bundle_menu(bundles, "Music")), MenuItemForeground("Music", _make_bundle_menu(bundles, "Music")),
MenuItemForeground("Media", _make_bundle_menu(bundles, "Media")),
MenuItemForeground("Games", _make_bundle_menu(bundles, "Games")),
MenuItemForeground("Apps", _make_bundle_menu(bundles, "Apps")), MenuItemForeground("Apps", _make_bundle_menu(bundles, "Apps")),
MenuItemForeground("System", menu_system), MenuItemForeground("System", menu_system),
], ],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment