diff --git a/gestures/startRadio.py b/gestures/startRadio.py deleted file mode 100644 index 9ad8f0ec..00000000 --- a/gestures/startRadio.py +++ /dev/null @@ -1,24 +0,0 @@ -def startRadio(station): - if runtime.isStarted("i01.audioPlayer"): - audioPlayer = runtime.getService("i01.audioPlayer") - audiocfg = audioPlayer.getConfig() - print("Radio started") - if audiocfg.stream == 0: - audiocfg.stream = 1 - audioPlayer.save() - audioPlayer.apply(audiocfg) - audioPlayer.broadcastState() - print(station) - audioPlayer.playFile(station) - -def stopRadio(): - if runtime.isStarted('i01.audioPlayer'): - audioPlayer = runtime.getService('i01.audioPlayer') - audioPlayer.stop() - print("Radio stopped") - audiocfg = audioPlayer.getConfig() - if audiocfg.stream == 1: - audiocfg.stream = 0 - audioPlayer.save() - audioPlayer.apply(audiocfg) - audioPlayer.broadcastState() \ No newline at end of file diff --git a/peers/ProgramAB/fr-FR/aiml/jukebox.aiml b/peers/ProgramAB/fr-FR/aiml/jukebox.aiml index a6a4c044..c59d8d70 100644 --- a/peers/ProgramAB/fr-FR/aiml/jukebox.aiml +++ b/peers/ProgramAB/fr-FR/aiml/jukebox.aiml @@ -241,6 +241,8 @@ END_PLAYLIST + + * RADIO * + + * MUSIQUE CLASSIQUE + + + + + * MUSIQUE DE JAZZ + + + + + * MUSIQUE DE FILM + + + STOP LA RADIO + + + STOPPE LA RADIO + + + + + STOPPE LA MUSIQUE + + + + + ÉTEINS LA RADIO + + + \ No newline at end of file diff --git a/services/1_AudioFile.py b/services/1_AudioFile.py index 024b7fd1..e07b95b6 100644 --- a/services/1_AudioFile.py +++ b/services/1_AudioFile.py @@ -133,3 +133,27 @@ def previousPlay(): else: i01.warn("i01.chatBot needs to be started") +def startRadio(station): + if runtime.isStarted("i01.audioPlayer"): + audioPlayer = runtime.getService("i01.audioPlayer") + audiocfg = audioPlayer.getConfig() + print("Radio started") + if audiocfg.stream == 0: + audiocfg.stream = 1 + audioPlayer.save() + audioPlayer.apply(audiocfg) + audioPlayer.broadcastState() + print(station) + audioPlayer.playFile(station) + +def stopRadio(): + if runtime.isStarted('i01.audioPlayer'): + audioPlayer = runtime.getService('i01.audioPlayer') + audioPlayer.stop() + print("Radio stopped") + audiocfg = audioPlayer.getConfig() + if audiocfg.stream == 1: + audiocfg.stream = 0 + audioPlayer.save() + audioPlayer.apply(audiocfg) + audioPlayer.broadcastState()