Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/runtime_requirements #2

Merged
merged 1 commit into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from ovos_workshop.skills.common_play import OVOSCommonPlaybackSkill, \
ocp_search
from py_bandcamp import BandCamp
from ovos_utils.process_utils import RuntimeRequirements
from ovos_utils import classproperty


class BandCampSkill(OVOSCommonPlaybackSkill):
Expand All @@ -14,6 +16,18 @@ def __init__(self):
self.supported_media = [MediaType.GENERIC, MediaType.MUSIC]
self.skill_icon = join(dirname(__file__), "ui", "logo.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)

# common play
@ocp_search()
def search_bandcamp_artist(self, phrase,
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
py_bandcamp>=0.7.0
ovos_workshop>=0.0.5a1
ovos-utils~=0.0, >=0.0.28a4
ovos_workshop~=0.0, >=0.0.11a4