diff --git a/discobert.py b/discobert.py index 5cc0e43..d4fdbaf 100644 --- a/discobert.py +++ b/discobert.py @@ -156,6 +156,13 @@ def startMusic(playlist, single=False, shuffle=True, repeat=True): client.setvol(80)# set volume client.play() # play +def getNewestPodcastUrl(xml): + podcast = xml + podcast_string = requests.get(podcast).text + tree = ET.fromstring(podcast_string) + return tree.find('.//enclosure').get('url') + + def playMusic(): try: client.play() @@ -517,8 +524,9 @@ while True: if(code == "mode_record"): say("I'm sorry, I'm afraid I can't do that!") - if(code == "mode_help"): - tour() + if(code == "mode_news"): + oejournalUrl = getNewestPodcastUrl('https://files.orf.at/podcast/oe1/oe1_journale.xml') + startMusic(oejournalUrl) if(inUseBefore != inUse): diff --git a/lircrc b/lircrc index 4257ee3..1b09c87 100644 --- a/lircrc +++ b/lircrc @@ -66,8 +66,7 @@ end begin button = KEY_CD prog = disco - config = mode_help - repeat = 20 + config = mode_news end diff --git a/remotes/Sony-RM-V33E-mapping.svg b/remotes/Sony-RM-V33E-mapping.svg new file mode 100644 index 0000000..5daf96a --- /dev/null +++ b/remotes/Sony-RM-V33E-mapping.svg @@ -0,0 +1,1156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + DISCO + LIGHT + OFF + 1 + 2 + 3 + 4 + 5 + -30 + -5 + +5 + +30 + INFO + PAUSE + STOP + PREV + NEXT + STOP + MUTE + FM4 + Ö1 + VOL+ + VOL- + PLAY + HELP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SEEK + SEEK + MODES + CHANNELS + RADIO + + + + + + + + + + + + + + + + + + + DISCOBERT + + + + +