How to limit the number of episodes from each Podcast feed?

Asked by D.B. Pole

I am trying to maintain a set number of episodes from each of my Podcast feeds, but don't know how to do this with Rhythmbox. E.g. Let's say that I want to keep only the latest 10 episodes of the LinuxQuestions podcast. How do I make this change?

Ability to keep just the latest "X" number of podcasts would greatly improve podcast management features of Rhythmbox. Right now, I can download unlimited podcast episodes, but then I have to manually go through them to remove those that I already heard from my iPod and add just the new ones from the most recently downloaded list.

Thank you in advance for your response.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu rhythmbox Edit question
Assignee:
No assignee Edit question
Solved by:
Alan Pope 🍺🐧🐱 πŸ¦„
Solved:
Last query:
Last reply:
Revision history for this message
Best Alan Pope 🍺🐧🐱 πŸ¦„ (popey) said :
#1

I agree, this is a feature I also would like. You might want to report it as a wish list on the bug tracker and it may well be implemented for a future release:-

https://bugs.launchpad.net/ubuntu/+source/rhythmbox/+bugs

What I do is run a little script that gets rid of anything older then 7 days (because my rationale is I probably wont have time to listen and it will be stale by the time I do). Here is the script:-

#!/bin/sh
find ./podcasts -mtime +7 -exec rm -f {} \;

Put that in a text editor, change the 7 to whatever value you like, and the word "podcasts" to whatever the name of the folder is where your podcasts live, save it to your desktop, right click it and make it executable. Then click it whenever you want to tidy up. Not great but better than manually having to delete files.

While I am here I will share the other two scripts I use:-

This one copies all new podcasts to my mp3 player (an IHP100 - hence the directory name).

#!/bin/sh
rsync -av --stats -progress --modify-window=1 ~/podcasts/ /media/IHP100/podcasts/

It uses rsync so that it doesn't copy the same podcasts time and time again, but only the new ones.

Finally the last one is used to backup downloaded podcasts to my external USB hard disk.

#!/bin/sh
rsync -avz ~/podcasts /media/750GDisk/Audio

Hope that helps.

Revision history for this message
D.B. Pole (jakubmazur) said :
#2

Thanks Alan Pope, that solved my question.

Revision history for this message
D.B. Pole (jakubmazur) said :
#3

Thank you, Alan. These scripts are great!
If I may, I'd like to add a couple of notes for others is they're looking to use your scripts:
1 - In the first script (one that removes old podcasts), I created a copy of that script for each of my podcasts. Each of the copies points to a specific podcast's folder.
2 - A couple of my podcasts come from a local radio station and, like other podcasts, are automatically saved to their own folder by Rythymbox. The two podcasts' folder has a hyphen ("-") in its name as in "WBT - Jeff Katz". This confuses the script and returns "find: invalid predicate "-"" when running the scripts from terminal. All in all, this is a minor issue since it only affects podcasts with a hyphen in their directory's name.

Thank you again, Alan. These scripts will save me at least 15-20 minutes per week.