<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.webos-internals.org/index.php?action=history&amp;feed=atom&amp;title=Podcatcher</id>
	<title>Podcatcher - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.webos-internals.org/index.php?action=history&amp;feed=atom&amp;title=Podcatcher"/>
	<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Podcatcher&amp;action=history"/>
	<updated>2026-05-06T21:55:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Podcatcher&amp;diff=1475&amp;oldid=prev</id>
		<title>Hopspitfire: New page: == A couple of scripts for podcatching, podcast management, and playlist creation==  === Motivation=== I wanted an on-device method for downloading podcast episodes and generating playlist...</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Podcatcher&amp;diff=1475&amp;oldid=prev"/>
		<updated>2009-07-21T23:55:13Z</updated>

		<summary type="html">&lt;p&gt;New page: == A couple of scripts for podcatching, podcast management, and playlist creation==  === Motivation=== I wanted an on-device method for downloading podcast episodes and generating playlist...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== A couple of scripts for podcatching, podcast management, and playlist creation==&lt;br /&gt;
&lt;br /&gt;
=== Motivation===&lt;br /&gt;
I wanted an on-device method for downloading podcast episodes and generating playlists, and didn't want to have to rely on iTunes.&lt;br /&gt;
&lt;br /&gt;
=== Scripts===&lt;br /&gt;
I put all these scripts in /var/home/scripts, do with them as you please.&lt;br /&gt;
&lt;br /&gt;
==== bashpodder.shell====&lt;br /&gt;
First, I took [*http://lincgeek.org/bashpodder bashpodder] and modified it a bit.  This isn't really related to webOS, but is more just general Linux scripting.&lt;br /&gt;
&lt;br /&gt;
Download from [http://gitorious.org/webos-internals/podcatcher/blobs/raw/master/bashpodder.shell gitorious]&lt;br /&gt;
&lt;br /&gt;
==== bp.conf====&lt;br /&gt;
This is the config file that bashpodder uses.  The bashpodder above allows a MAX parameter after the name of each feed to limit the number of episodes you get.&lt;br /&gt;
&lt;br /&gt;
Example bp.conf&lt;br /&gt;
&lt;br /&gt;
Download from [http://gitorious.org/webos-internals/podcatcher/blobs/raw/master/bp.conf gitorious]&lt;br /&gt;
&lt;br /&gt;
==== generatePlaylist.sh====&lt;br /&gt;
The last line of bashpodder originally generated a .m3u playlist, but I wanted to move this out to a separate process (so I could remove episodes and regenerate the playlist).&lt;br /&gt;
&lt;br /&gt;
As soon as luna sees the .m3u being created in /media/internal, it adds it to the com_palm_media_playlist table, but it doesn't parse it to fill out the playlist, so you never see your episodes.  That's what generatePlaylist.sh fixes. &lt;br /&gt;
&lt;br /&gt;
Again, if you want, you can remove episodes and rerun this script to regenerate the playlist with the updated list of episodes.&lt;br /&gt;
&lt;br /&gt;
Download from [http://gitorious.org/webos-internals/podcatcher/blobs/raw/master/generatePlaylist.sh gitorious]&lt;br /&gt;
&lt;br /&gt;
==== podcatcher.sh====&lt;br /&gt;
Finally, you'll probably want all of this to be run from cron every few hours or so (preferably when you're on WiFi).&lt;br /&gt;
&lt;br /&gt;
If you have not setup cron yet, refer to [[tracking]].&lt;br /&gt;
&lt;br /&gt;
Download from [http://gitorious.org/webos-internals/podcatcher/blobs/raw/master/podcatcher.sh gitorious]&lt;br /&gt;
&lt;br /&gt;
And an associated cronjob:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
0 */6 * * * /var/home/scripts/podcatcher.sh 2&amp;gt;&amp;amp;1 &amp;gt;&amp;gt; /var/home/scripts/podcatcher.log&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Whenever the cronjob runs, the MAX most recent episodes of your podcasts will be downloaded (if they haven't been downloaded already), and the playlist will be updated.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting===&lt;br /&gt;
If a download fails, you can force a re-download by removing the source address from podcast.log. (The re-downloaded podcast will not be in the correct order in the playlist.)&lt;br /&gt;
&lt;br /&gt;
You can check podcatcher.log to see if any error messages are being thrown.&lt;br /&gt;
&lt;br /&gt;
Make sure your executable scripts are chmod u+x:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
chmod u+x bashpodder.shell&lt;br /&gt;
chmod u+x generatePlaylist.sh&lt;br /&gt;
chmod u+x podcatcher.sh&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Caveats===&lt;br /&gt;
*If this deletes all your files, I'm sorry.&lt;br /&gt;
*If you go over your 5gb cap, I'm sorry.&lt;br /&gt;
*I have no idea what happens if you're using the media player when this script runs.&lt;br /&gt;
** Actually, what seems to happen is it kicks you out of your playlist.  That's... unfortunate, but acceptable.&lt;br /&gt;
*I haven't tested to see what happens on address not found messages during wgets.&lt;br /&gt;
Use at your own risk.&lt;br /&gt;
&lt;br /&gt;
Also, if future updates of WebOS properly handle .m3u files, then these scripts should be updated.&lt;/div&gt;</summary>
		<author><name>Hopspitfire</name></author>
	</entry>
</feed>