audiobookshelf icon indicating copy to clipboard operation
audiobookshelf copied to clipboard

feat: Improve RSS Manager adding Podcast Feed Subscriptions Health Check

Open mfcar opened this issue 1 year ago • 10 comments

This pull request introduces a new feature that improves podcast management by allowing users to check the health status of feed URLs for incoming podcasts:

  1. Feed Health Status: Users can now easily determine whether a podcast's feed URL is healthy or not. Every time the AudioBookShelf accesses the feed URL, it performs a verification and marks the feed as either healthy or not.

  2. Manager Page: A new tab has been added on the Confi -> RSS Feeds, where users can view all the podcasts that contain a feed URL. This screen provides the following information:

    • Title/Feed URL
    • Feed URL: The Feed URL. It's truncated because sometimes the URL is gigantic
    • Last Checked: It's the last date and time that the Feed URL was checked
    • Last Successful Check Date (new table column): Displays the date and time of the application able to access the feed URL with success
    • Feed Healthy (new table column): Indicates whether the feed URL is marked as healthy or not.
    • Auto Download Episodes: Indicate if the podcast has the auto download enabled
    • Next Automatic Check: If the feed has a cron, show the next time that the feed will be checked
    • Buttons:
      • Copy to Clipboard: Copy the feed URL to the clipboard
      • Force Recheck: Allows users to manually trigger a recheck of the feed's health status.

Reason for the Changes

This feature was added to provide users with greater transparency and control over the health of incoming podcast feed URLs. It empowers users to make informed decisions about which feeds to subscribe to based on their health status.

How to Test

To test this feature, follow these steps:

  1. Navigate to the Config --> RSS Feeds.
  2. Check the list of podcasts with associated feed URLs.
  3. Click the "Force Recheck" button for a podcast to trigger a manual recheck.
  4. Verify that the health status is updated accordingly.

Additional Notes

  • Every time AudioBookShelf accesses the feed, it saves the feed's healthy status (e.g., for downloading new episodes or displaying them on the Podcast Detail page).

The new Page working

https://github.com/advplyr/audiobookshelf/assets/814828/ea3e45af-7ff2-4bcb-a93a-7b947e2a834b


Subscribed Feeds page

Screenshot 2024-05-12 at 18 28 08

The RSS Page has been renamed to Opened Feeds and now it's a tab on the RSS Page, that includes a new search box to filter by title.

image


Podcast health icon displayed with feed URL and date of last update on details page:

With a healthy feed Screenshot 2023-10-03 at 01 25 09

With an unhealthy feed Screenshot 2023-10-03 at 01 31 12

Without a feed URL Screenshot 2023-10-03 at 01 30 02

mfcar avatar Oct 03 '23 15:10 mfcar

@advplyr , @shawnphoffman your feedback is very much appreciated.

mfcar avatar Oct 03 '23 15:10 mfcar

Does "healthy" just mean the last check was good?

If so, could there be a third indicator (yellow exclamation mark cloud) that indicates the last check was bad but the automatic download has not been disabled yet? I think it looks pretty nice!

I'm debating whether that should be in its own column (how many failed checks) but I think that will complicate the interface and confuse users when they "force check" so just having the third indicator would be better.

nichwall avatar Oct 03 '23 16:10 nichwall

Thanks for your feedback nichwall

Does "healthy" just mean the last check was good?

I added two tooltips, but I believe they can be improved. Screenshot 2023-10-03 at 17 32 19 Screenshot 2023-10-03 at 17 39 47

If so, could there be a third indicator (yellow exclamation mark cloud) that indicates the last check was bad but the automatic download has not been disabled yet? I think it looks pretty nice!

I'm not sure if automatic downloads are disabled after errors, but I can try implementing it.

mfcar avatar Oct 03 '23 16:10 mfcar

I'm not sure if automatic downloads are disabled after errors, but I can try implementing it.

I don't remember exactly when it happens, but I think it's something like after 5 failed automatic checks the cron is removed so it doesn't keep checking something that's not working.

Edit to add: I personally haven't had automatic downloads disabled, but it would be a nice addition to the summary view you've made :)

nichwall avatar Oct 03 '23 16:10 nichwall

I'm not sure if automatic downloads are disabled after errors, but I can try implementing it.

I don't remember exactly when it happens, but I think it's something like after 5 failed automatic checks the cron is removed so it doesn't keep checking something that's not working.

Edit to add: I personally haven't had automatic downloads disabled, but it would be a nice addition to the summary view you've made :)

I was able to locate the code that disables automatic downloads if (this.failedCheckMap[libraryItem.id] >= this.MaxFailedEpisodeChecks) { libraryItem.media.autoDownloadEpisodes = false I will run some tests to see how I can implement an intermediary value (yellow cloud icon)

mfcar avatar Oct 03 '23 16:10 mfcar

It looks like you have different tab settings on your code editor making it hard to see what was changed

advplyr avatar Oct 03 '23 20:10 advplyr

It looks like you have different tab settings on your code editor making it hard to see what was changed

Sorry for the indentation mix-up (I need to review my configuration on the WebStorm). I've fixed Podcast.js and PodcastManager.js, and the other files already use the two-space rule. 😅

mfcar avatar Oct 03 '23 22:10 mfcar

There is one issue with this to me that may just be semantic. In Abs you aren't really "subscribing" to a podcast.

You may just be using a podcast library for your local files and there is no associated RSS feed. Hardcore history is a good example of this.

I don't have a suggestion right now on how to make this more clear. To me a subscribed podcast would be one that you have enabled auto-download. If you're not auto-downloading then the RSS feed is set but doesn't do anything except when you click the search button.

advplyr avatar Oct 07 '23 15:10 advplyr

@mfcar A different issue I just thought of. Is the health check page in the server settings or the library settings? If in the server settings, I think it should be moved to the library settings (as a tab on the library setup). That will make it easier to differentiate which library a podcast is in, and would simplify permissions if someone has edit access, but not access to all podcast libraries.

I don't have a suggestion right now on how to make this more clear. To me a subscribed podcast would be one that you have enabled auto-download. If you're not auto-downloading then the RSS feed is set but doesn't do anything except when you click the search button.

In this PR, it looks like the "subscribed" podcasts are any podcasts with an RSS feed set up. Based on the screenshots, the "My Brother My Brother and Me" podcast doesn't show up in the list because there isn't an RSS feed, but the "Jogabilidade" podcast does show up, it just doesn't have auto download enabled.

I think having the distinction between "healthy" green, "issues" yellow, and "no autodownload" red is a good way to represent the state of all podcasts.

My above statement may help clear up the confusion, since the "Opened Feeds" is still a server setting, but the "Subscribed Feeds" would be a library setting. May need to rename the "subscribed", but at least they're not right next to each other.

nichwall avatar Oct 12 '23 14:10 nichwall

Sorry, I finally able back to this after a long time.

@mfcar A different issue I just thought of. Is the health check page in the server settings or the library settings? If in the server settings, I think it should be moved to the library settings (as a tab on the library setup). That will make it easier to differentiate which library a podcast is in, and would simplify permissions if someone has edit access, but not access to all podcast libraries.

Is in the server settings, I avoided to put this on the library settings, because is more a helper tool. Today I have subscribed around 50 external podcasts feeds between some libraries, but I notice that some podcasts are not been updated. Checking one by one is inviable, then I remember that a old plugin for WordPress called Broken Link Checker that make available on one main page a better control about the links and what are broken make easier to find what is broken for the feed urls as well.

It is currently in the server settings. I avoided to place it in the library settings because it's more of a helper tool. As of now, I have subscribed to around 50 external podcast feeds across various libraries. I've noticed that some podcasts are not being updated. Checking each one individually is not viable, and enter on multiples libraries make a burden to find a broken link. I tried to base this on an old WordPress plugin called 'Broken Link Checker'. This plugin provides a main page that makes it easier to control the links and identify which ones are broken. I believe a similar approach would be beneficial for managing feed URLs in our case. I think on this more like the Logs page where we can check everything on one page.

I don't have a suggestion right now on how to make this more clear. To me a subscribed podcast would be one that you have enabled auto-download. If you're not auto-downloading then the RSS feed is set but doesn't do anything except when you click the search button.

In this PR, it looks like the "subscribed" podcasts are any podcasts with an RSS feed set up. Based on the screenshots, the "My Brother My Brother and Me" podcast doesn't show up in the list because there isn't an RSS feed, but the "Jogabilidade" podcast does show up, it just doesn't have auto download enabled.

I think having the distinction between "healthy" green, "issues" yellow, and "no autodownload" red is a good way to represent the state of all podcasts.

I made some tests with the semaphore, but it became more complicated because red is typically associated with errors. Using red to indicate 'no auto-download' seems incorrect, as there may be valid reasons for a specific podcast not being set to auto-download. Therefore, I've added a new column to indicate the auto-download status, using 'Enabled' and 'Disabled' labels:

Screenshot 2024-05-12 at 18 28 08

My above statement may help clear up the confusion, since the "Opened Feeds" is still a server setting, but the "Subscribed Feeds" would be a library setting. May need to rename the "subscribed", but at least they're not right next to each other.

I've changed the name from 'Subscribed Feeds', which as you pointed out, does sound strange. I've renamed it to 'External Podcast Feeds Subscription Health Checker' to clarify that it's a tool for checking the health of feeds from external podcasts. But, in my tests, it became clear that indicates a tool, but the name is too long. I'm struggling to think of an alternative, but the good news is that it's only one string that needs to be changed.

mfcar avatar May 12 '24 20:05 mfcar