Skip to content

Commit

Permalink
feat/runtime_requirements (#2)
Browse files Browse the repository at this point in the history
* feat/runtime_requirements

* feat/runtime_requirements
  • Loading branch information
JarbasAl authored Feb 9, 2023
1 parent 5a7f4bf commit 1fe9e30
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
14 changes: 14 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from ovos_utils.parse import fuzzy_match
from ovos_workshop.skills.common_play import OVOSCommonPlaybackSkill, \
MediaType, PlaybackType, ocp_search, MatchConfidence, ocp_featured_media
from ovos_utils.process_utils import RuntimeRequirements
from ovos_utils import classproperty


class SomaFMSkill(OVOSCommonPlaybackSkill):
Expand All @@ -14,6 +16,18 @@ def __init__(self):
MediaType.RADIO]
self.skill_icon = join(dirname(__file__), "ui", "somafm.png")

@classproperty
def runtime_requirements(self):
return RuntimeRequirements(internet_before_load=True,
network_before_load=True,
gui_before_load=False,
requires_internet=True,
requires_network=True,
requires_gui=False,
no_internet_fallback=False,
no_network_fallback=False,
no_gui_fallback=True)

@ocp_featured_media()
def featured_media(self):
return [{
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ovos_workshop>=0.0.5a1
ovos-utils~=0.0, >=0.0.28a4
ovos_workshop~=0.0, >=0.0.11a4
radiosoma

0 comments on commit 1fe9e30

Please sign in to comment.