[Enhancement]: Add Option to Auto Delete Podcast Episodes when exceeding X episodes #578

Closed
opened 2026-04-24 23:13:28 +02:00 by adam · 3 comments
Owner

Originally created by @feerlessleadr on GitHub (Aug 12, 2022).

Describe the feature/enhancement

This was briefly discussed in this thread , but it was closed and not implemented or resolved as far as I can tell. As a result, I wanted to open a new request with a similar (but perhaps slightly different request).

I listen to a number of daily news type podcasts, but not super religiously. Sometimes I'll listen to new shows every day, and other times I won't listen for a week or more.

Since I don't want to listen to a news podcast that is 1 or 2 weeks out of date, it would be great if on the server, on a per podcast basis, I could turn on a setting that would only keep the latest "x" number of episodes (with "x" being user defined, say 5 as an example).

Any time a new episode is downloaded by the server with this setting enabled for that podcast, ABS would delete the oldest episode to make room for the new download.

Obviously this would not be a global setting, since there are many other episodic podcasts that this would not work well for.

Thanks for your consideration!

Originally created by @feerlessleadr on GitHub (Aug 12, 2022). ### Describe the feature/enhancement This was briefly discussed in [this thread ](https://github.com/advplyr/audiobookshelf/issues/576) , but it was closed and not implemented or resolved as far as I can tell. As a result, I wanted to open a new request with a similar (but perhaps slightly different request). I listen to a number of daily news type podcasts, but not super religiously. Sometimes I'll listen to new shows every day, and other times I won't listen for a week or more. Since I don't want to listen to a news podcast that is 1 or 2 weeks out of date, it would be great if on the server, on a per podcast basis, I could turn on a setting that would only keep the latest "x" number of episodes (with "x" being user defined, say 5 as an example). Any time a new episode is downloaded by the server with this setting enabled for that podcast, ABS would delete the oldest episode to make room for the new download. Obviously this would not be a global setting, since there are many other episodic podcasts that this would not work well for. Thanks for your consideration!
adam added the enhancement label 2026-04-24 23:13:28 +02:00
adam closed this issue 2026-04-24 23:13:29 +02:00
Author
Owner

@advplyr commented on GitHub (Aug 15, 2022):

Suppose you set the episode limit to 5 for a podcast, there are several scenarios we will need to workout before this gets implemented.

  1. You already have more than 5 episodes
  2. You manually download more than 5 episodes
  3. Some episodes don't have a pubDate set (could be scanned in from the file system)

The first 2 might not be an issue if the logic will only remove 1 episode when downloading 1 episode by the automatic downloader. So manually downloading episodes doesn't trigger any sort of removal, the only time a removal is triggered is if the auto download successfully downloads a new episode and you have more than 5 episodes.

For the 3rd situation we may want to just ignore episodes without a pubDate. For example if you have 6 episodes but 3 of them don't have a pubDate then only 3 will be considered when comparing for removal.

@advplyr commented on GitHub (Aug 15, 2022): Suppose you set the episode limit to 5 for a podcast, there are several scenarios we will need to workout before this gets implemented. 1. You already have more than 5 episodes 2. You manually download more than 5 episodes 3. Some episodes don't have a pubDate set (could be scanned in from the file system) The first 2 might not be an issue if the logic will only remove 1 episode when downloading 1 episode by the automatic downloader. So manually downloading episodes doesn't trigger any sort of removal, the only time a removal is triggered is if the auto download successfully downloads a new episode and you have more than 5 episodes. For the 3rd situation we may want to just ignore episodes without a pubDate. For example if you have 6 episodes but 3 of them don't have a pubDate then only 3 will be considered when comparing for removal.
Author
Owner

@feerlessleadr commented on GitHub (Aug 16, 2022):

I'll honestly defer to you.

If I were the one making the final call, in scenarios 1 and 2, I wouldn't handle previously downloaded, or manually downloaded episodes differently than auto downloaded. What you could do is, on a per episode basis, add an option to always keep or something, this way the user can explicitly decide to keep or not?

Honestly though, your proposal is probably the easiest, so that means sense to me too.

@feerlessleadr commented on GitHub (Aug 16, 2022): I'll honestly defer to you. If I were the one making the final call, in scenarios 1 and 2, I wouldn't handle previously downloaded, or manually downloaded episodes differently than auto downloaded. What you could do is, on a per episode basis, add an option to always keep or something, this way the user can explicitly decide to keep or not? Honestly though, your proposal is probably the easiest, so that means sense to me too.
Author
Owner

@advplyr commented on GitHub (Aug 21, 2022):

Added in 2.1.3

I went with the easier approach for now but we can revise later.

@advplyr commented on GitHub (Aug 21, 2022): Added in [2.1.3](https://github.com/advplyr/audiobookshelf/releases/tag/v2.1.3) I went with the easier approach for now but we can revise later.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#578