Skip to content

Commit

Permalink
ocp metadata in init method (#185)
Browse files Browse the repository at this point in the history
* ocp metadata in init method

* leave imports alone

---------

Co-authored-by: JarbasAi <[email protected]>
  • Loading branch information
NeonJarbas and JarbasAl authored Feb 7, 2024
1 parent 2d31972 commit 3f3b629
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions ovos_workshop/skills/common_play.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ def ...
vocab for starting playback is needed.
"""

def __init__(self, *args, **kwargs):
# NOTE: derived skills will likely want to override this list
self.supported_media = [MediaType.GENERIC]
def __init__(self, supported_media=None, skill_icon="", *args, **kwargs):
self.supported_media = supported_media or [MediaType.GENERIC]
skill_name = camel_case_split(self.__class__.__name__)
alt = skill_name.replace(" skill", "").replace(" Skill", "")
self.skill_aliases = [skill_name, alt]
Expand All @@ -74,10 +73,8 @@ def __init__(self, *args, **kwargs):
self.__resume_handler = None
self._stop_event = Event()
self._playing = Event()
# TODO replace with new default
self.skill_icon = \
"https://github.com/OpenVoiceOS/ovos-ocp-audio-plugin/raw/master/" \
"ovos_plugin_common_play/ocp/res/ui/images/ocp.png"
# TODO new default icon
self.skill_icon = skill_icon or ""

self.ocp_matchers = {}
super().__init__(*args, **kwargs)
Expand Down

0 comments on commit 3f3b629

Please sign in to comment.