Quick and dirty script to get all your podcasts into an M3U

Howtos, instructions and links to related software. Do not ask questions here.
anteatersa
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 15 Mar 2013, 00:50

Quick and dirty script to get all your podcasts into an M3U

Postby anteatersa » 15 Mar 2013, 00:56

Hi, I have written a very basic bash script to get all your podcasts into a playlist to be loaded into Winamp or Foobar2k etc:

Code: Select all

#!/bin/bash
cd /var/www/rss/playlists
echo "#EXTM3U###newline###" > podcasts.m3u
mysql -u tt_rss -pYOUPASSWORD tt_rss --execute="SELECT '#EXTINF:123,',entr.author,' - ',entr.title,'###newline###',encl.content_url,'###newline###'  FROM ttrss_enclosures encl LEFT JOIN ttrss_entries AS entr ON encl.post_id = entr.id WHERE encl.content_url LIKE '%.mp3%' OR encl.content_url LIKE '%.ogg%' ORDER BY entr.updated DESC" >> podcasts.m3u
sed -i 's/###newline###/\n/g' podcasts.m3u
sed -i 's/\t//' podcasts.m3u


I then run this as a cronjob every hour.

For some reason it's not loading the author - title when loaded into Foobar2k, hopefully someone can help with this?

hom
Bear Rating Trainee
Bear Rating Trainee
Posts: 1
Joined: 19 Mar 2013, 23:57

Re: Quick and dirty script to get all your podcasts into an

Postby hom » 20 Mar 2013, 00:03

Wow, great! I think that will be perfect with my MPD server (on the same raspberry pi that my TT-RSS).
I'll try tomorow.


Return to “Knowledge Base”

Who is online

Users browsing this forum: No registered users and 1 guest