Life Journal

If you're interested in reading my reflections on the Life Journal Bible readings, check out Ian's Life Journal blog.

Thursday 16 May 2013

Android script for moving RSSdemon podcasts to MortPlayer

I have an Android phone and use RSSdemon to download the podcasts I listen to. However, during playback of long podcasts, e.g. BBC Global News, if something interrupts the playback, e.g. an alarm goes off or Waze says “Turn right”, it will often lose its place and restart playing the podcast from the beginning!

Another app, MortPlayer Audio Books, does a very good job of keeping track of where you are in the podcast in spite of interruptions. However, MortPlayer does not download podcasts for you — you have to manually download the podcasts and put them in MortPlayer's directory.

At first, I thought to make MortPlayer look in RSSdemon's directory. However, RSSdemon stores the podcasts without the .mp3 extension, so MortPlayer does not recognize the files as audio files.

For this reason, I wrote this shell script which would move the files from the RSSdemon directory into the MortPlayer directory, and add the .mp3 extension. I can then tell MortPlayer to rescan and the new podcasts would be available.


#!/system/bin/sh

P_RSSDEMON=/storage/sdcard0/com.meecel.feedreader.RssDemonAd/cache/Podcast
P_MORTPLAYER=/storage/sdcard0/Music/Podcasts/RSS

P_DEST=$P_MORTPLAYER/`date +'%y%m%d'`

mkdir -p $P_DEST

cd $P_RSSDEMON

for i in * ; do mv $i $P_DEST/$i.mp3 ; done



You will need a script player app like SL4a to run the script. Change the P_RSSDEMON and P_MORTPLAYER directories to match your phone's directory structure. In particular, your phone might use sdcard or sdcard1 instead of sdcard0 as my phone does.