Skip to content

Commit

Permalink
Update action-louisros.radio.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kheperV3 authored Aug 27, 2018
1 parent 6431d15 commit 13c9ca8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions action-louisros.radio.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def CString(s):
if s[len(s)-1] != '\0' :
s = s + '\0'
return s
def waitForNewSession():
"""def waitForNewSession():
fv = open("/var/lib/snips/skills/session","r")
session = int(PyString(fv.read()))
fv.close()
Expand All @@ -57,7 +57,7 @@ def waitForNewSession():
fv.write(CString('0002'))
fv.close()
time.sleep(.1)

"""
def intents_callback(hermes, intentMessage) :
links = {"RFI":"http://live02.rfi.fr/rfimonde-96k.mp3",\
"Hardcore":"http://dir.xiph.org/listen/2126093/listen.mp3",\
Expand Down Expand Up @@ -206,8 +206,11 @@ def intents_callback(hermes, intentMessage) :

if __name__ == "__main__":
with Hermes(MQTT_ADDR) as h:
h.subscribe_intents(intents_callback)
h.loop_start()
h.subscribe_intents(intents_callback)
while True:
h.loop_start()
time.sleep(.1)
h.loop_stop()



Expand Down

0 comments on commit 13c9ca8

Please sign in to comment.