# How to start a podcast by command line - or how to add latest podcast of a xml RSS feed to playlist?

**URL:** <https://discourse.mopidy.com/t/how-to-start-a-podcast-by-command-line-or-how-to-add-latest-podcast-of-a-xml-rss-feed-to-playlist/1055>\
**Category:** Pi MusicBox (archive)\
**Created:** [January 10, 2016, 9:07am UTC](https://discourse.mopidy.com/t/how-to-start-a-podcast-by-command-line-or-how-to-add-latest-podcast-of-a-xml-rss-feed-to-playlist/1055 "2016-01-10T09:07:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sattias\_Mott](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@Sattias\_Mott](https://discourse.mopidy.com/u/Sattias_Mott)\
**Post date:** [January 10, 2016, 9:07am UTC](https://discourse.mopidy.com/t/how-to-start-a-podcast-by-command-line-or-how-to-add-latest-podcast-of-a-xml-rss-feed-to-playlist/1055/1 "2016-01-10T09:07:19Z")

</div>

Hi,

first, thanks for Pi Musicbox. This is amazing! Thank you for this awesome work, we (my whole family) is enjoying it very much!

Starting a web-radio stream on boot works quite fine.  
Is there a possibility to add the most actual element of a podcast RSS xml feed to the playlist? My idea was that the Pi Musicbox starts up with the most actual podcast and then after the first element of the podcast automatically switches to a webradio.

Edit: A different approach would be to write a script that starts the podcast and after the first “song” it stops and starts a playlist.  
What is the mpd command for a podcast?  
I couldn’t unearth something about it.

Thanks you very much in advance!

---

<div class="post-metadata">

**Author:** ![tkem](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/tkem/32/22_2.png) [@tkem](https://discourse.mopidy.com/u/tkem)\
**Post date:** [January 23, 2016, 10:56am UTC](https://discourse.mopidy.com/t/how-to-start-a-podcast-by-command-line-or-how-to-add-latest-podcast-of-a-xml-rss-feed-to-playlist/1055/2 "2016-01-23T10:56:41Z")

</div>

If you have the `mopidy-podcast` extension installed, you can load all episodes of a podcast using `mpc` simply by prefixing the podcast URL with “podcast+”, for example:

mpc add “podcast+http://www.npr.org/rss/podca  
st.php?id=510019”

---

<div class="post-metadata">

**Author:** ![Sattias\_Mott](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@Sattias\_Mott](https://discourse.mopidy.com/u/Sattias_Mott)\
**Post date:** [January 24, 2016, 9:15am UTC](https://discourse.mopidy.com/t/how-to-start-a-podcast-by-command-line-or-how-to-add-latest-podcast-of-a-xml-rss-feed-to-playlist/1055/3 "2016-01-24T09:15:50Z")

</div>

Thanks a lot tkem! That is actually what I searched for

Writing a small bash script

```auto
#!/bin/bash
sleep 60 &&
mpc add "podcast+[podcast url]"
mpc play &&
mpc crop && # to leave just the most actual podcast in the playlist
mpc load "Discover Weekly by spotifydiscover" && # just an example
####

```

and adding it to /etc/rc.local did the trick!

Is there a command to wait for mopidy and mpc running after booting?  
Then I could exchange it with the “sleep” command and musicbox would probably start faster.

---

<div class="post-metadata">

**Author:** ![tkem](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/tkem/32/22_2.png) [@tkem](https://discourse.mopidy.com/u/tkem)\
**Post date:** [January 25, 2016, 7:27pm UTC](https://discourse.mopidy.com/t/how-to-start-a-podcast-by-command-line-or-how-to-add-latest-podcast-of-a-xml-rss-feed-to-playlist/1055/4 "2016-01-25T19:27:54Z")

</div>

You could probably loop in your script until `mpd status` returns without error; maybe [https://github.com/tkem/mpd-watchdog/blob/master/mpd-watchdog#L97](https://github.com/tkem/mpd-watchdog/blob/master/mpd-watchdog#L97) will give some inspiration…

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [January 25, 2016, 8:17pm UTC](https://discourse.mopidy.com/t/how-to-start-a-podcast-by-command-line-or-how-to-add-latest-podcast-of-a-xml-rss-feed-to-playlist/1055/5 "2016-01-25T20:17:59Z")

</div>

The autoplay feature does this. Take a look at the code at the bottom of /opt/musicbox/startup.sh and adapt it to what you want.

---

<div class="post-metadata">

**Author:** ![Salve\_Lolo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/salve_lolo/32/321_2.png) [@Salve\_Lolo](https://discourse.mopidy.com/u/Salve_Lolo)\
**Post date:** [February 5, 2016, 7:41am UTC](https://discourse.mopidy.com/t/how-to-start-a-podcast-by-command-line-or-how-to-add-latest-podcast-of-a-xml-rss-feed-to-playlist/1055/6 "2016-02-05T07:41:48Z")

</div>

what is the best GUI for PI music box using raspberry pi?

---

<div class="post-metadata">

**Author:** ![jodal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/jodal/32/2564_2.png) [@jodal](https://discourse.mopidy.com/u/jodal)\
**Post date:** [February 5, 2016, 10:45am UTC](https://discourse.mopidy.com/t/how-to-start-a-podcast-by-command-line-or-how-to-add-latest-podcast-of-a-xml-rss-feed-to-playlist/1055/7 "2016-02-05T10:45:25Z")

</div>

@Salve_Lolo Please refrain from stealing existing unrelated topics for your questions. I made a new topic for your question over at [What is the best GUI for PI music box using raspberry pi?](https://discourse.mopidy.com/t/what-is-the-best-gui-for-pi-music-box-using-raspberry-pi/1098)

---

<div class="post-metadata">

**Author:** ![jodal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/jodal/32/2564_2.png) [@jodal](https://discourse.mopidy.com/u/jodal)\
**Post date:** [February 19, 2026, 11:47am UTC](https://discourse.mopidy.com/t/how-to-start-a-podcast-by-command-line-or-how-to-add-latest-podcast-of-a-xml-rss-feed-to-playlist/1055/8 "2026-02-19T11:47:31Z")

</div>


