Playing podcasts with a button push

Hello all, I am able to use gpio pins to play the [Radio Streams] playlist. A button push runs a script which loads the play list. and would like to do the same for a podcast.
Is it possible to run the podcasts using mpc commands or is it a bit more involved. If it is please may I have an example of a command line.

mpc add <podcast uri>
mpc play

There is an extensive manual for mpc if you look.

You can get the uri by playing the podcast normally through the web interface then clicking the button on the Streams page to get now playing.

I use this ‘https://linux.die.net/man/1/mpc

What you suggest will play a podcast but only the specific cast that the URI refers to, the button push will only ever play one episode and when a new episode is available it will be bypassed as it has a different URI, at least that is the case for BBC ones I’m trying to play. If I run ‘mpc ls’ I see one of the folders in mps’s music directory is Podcasts. I wanted to know how to navigate to it, or is it more complicated?

Ahh. Yes that is going to be more complicated. So you want either a static uri that points to the latest podcast (I don’t know if the Mopidy-podcast extension provides anything like this) e.g. podcast:bbc:some-how:latest. Or, more likely, to navigate the directory structure. You should be able to mpc ls podcasts/some-folder/bbc/some-show/ | mpc add. But that depends on how they are ordered. I think the order might be dependent on the individual podcast. Can you give a specific example we could look at? I don’t ever listen to podcasts myself.

Partial success with navigating to the podcast folder. Plays random episodes also has unstable results, sometimes times out.

This works for me to play the latest episode:

mpc clear
mpc add ‘podcast+https://www.ivoox.com/cafe-con-nata_fg_f1130285_filtro_1.xml’
mpc play $(mpc playlist | wc -l) # count all entries and play the result

http://rootfriend.com/mopidy-podcasts