Expanded "exclude" filter

The “exclude” feature seems to be working great in the “downloads” portion of the app, but in many (most?) cases, if you don’t want the app to auto-download, you may not want to see that certain episode contain the word or phrase for that pod anywhere at all. Specifically within the “episode” section, where it still shows up.

Fantastic app, and just my 2 ¢

This would be an interesting additional filtering criteria. Either “auto-download excluded” or “auto-download included”? (naming stuff is hard)

  • An episode would be “auto-download included” if no Episode Filter is configured, or if it is configured and the episode matches any of the filter patterns.
  • It would be “auto-download excluded” if an exclude filter is configured, and the episode matches any of the filter patterns.

I did a little digging into the codebase tonight, and it might be a bit complicated to accomplish this without some refactoring. The existing filters appear to select episodes using SQL queries made against the DB, while auto-downloads are performed by evaluating the filter against the episode title during feed updates.

Whether or not to download a given episode is not something stored in the database, in other words.

One way I can think of to accomplish this is if AntennaPod conditionally gathered a list of episode IDs which return true for shouldAutoDownload (or whatever that function is called), and then add a clause to the SQL query to filter rows to those in that list. For example, something like AND id IN (1, 26, 47), assuming those are the IDs of the FeedItems that would be auto-downloaded given the Episode Filter. However, for podcasts which have large backlogs of episodes, this would not be very efficient.

Perhaps a better way to do this would be to repurpose the auto_download column in the FeedItems table. Updating an episode filter could trigger an async update of the FeedItems table for episodes matching that feed’s ID, and feed updates would also write a 1 or 0 for auto_download once the update process has evaluated whether or not to download the file.