Play most recent episode from a podcast?

I finally managed to use my chromecast audio with smartthigns thanks to this guide.

I can play a mp3, for example, an episode from up first if I hard coded the url:

Is it possible to have webcore retrieve the URL from the most recent episode from their website?

1 Like

I was able to create a core piston that does this with the help of a bash script that a run on my synology. This is the piston:

And this is the bash script that cron runs at 6 am Mon-Fri

#!/bin/bash
podcatcher --dir /podcasts/ -S one http://feeds.feedburner.com/npr/POtf
ls -t /podcasts/cache | head -n 1 | xargs -I '{}' mv /podcasts/cache/'{}' /alarm/alarm.mp3

shopt -s globstar
flacfiles=(/music/Ludovico\ Einaudi/**/*.flac)
cp "${flacfiles[RANDOM % ${#flacfiles[@]}]}" /alarm/music.flac

I also have a local web server running on my synology so that webcore can access those two files.

2 Likes

If you can figure out the logic of the new URLs, you might be able to do this workaround that I made below. There are two podcasts that I listen to each morning, and their URLs are defined in part by the year, month and day.