Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Improve RSS Manager adding Podcast Feed Subscriptions Health Check #2178

Open
wants to merge 35 commits into
base: master
Choose a base branch
from

Conversation

mfcar
Copy link
Contributor

@mfcar mfcar commented Oct 3, 2023

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

Screen.Recording.2023-10-03.at.12.05.22.mov

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
Copy link
Contributor Author

mfcar commented Oct 3, 2023

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

@nichwall
Copy link
Contributor

nichwall commented Oct 3, 2023

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.

@mfcar
Copy link
Contributor Author

mfcar commented Oct 3, 2023

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.

@nichwall
Copy link
Contributor

nichwall commented Oct 3, 2023

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 :)

@mfcar
Copy link
Contributor Author

mfcar commented Oct 3, 2023

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)

@advplyr
Copy link
Owner

advplyr commented Oct 3, 2023

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

@mfcar
Copy link
Contributor Author

mfcar commented Oct 3, 2023

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. 😅

@advplyr
Copy link
Owner

advplyr commented Oct 7, 2023

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.

@nichwall
Copy link
Contributor

@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.

@mfcar mfcar changed the title Improve RSS Manager adding Incoming Feed Health Check Improve RSS Manager adding Podcast Feed Subscriptions Health Check May 11, 2024
@mfcar
Copy link
Contributor Author

mfcar commented May 12, 2024

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 mfcar marked this pull request as ready for review May 12, 2024 20:06
@@ -147,6 +150,7 @@
"HeaderNewAccount": "New Account",
"HeaderNewLibrary": "New Library",
"HeaderNotifications": "Notifications",
"HeaderOpenedRSSFeeds": "ABS Hosted RSS Feed",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want to update other references to RSS feeds so everything is saying "Host/Hosted" instead of "Open".

This won't affect this key since it's a new one, but if we do change the language from "Open" we'll want to make new keys and reference those keys so there aren't any translation issues. Not sure if that matters for this PR.

@mfcar mfcar changed the title Improve RSS Manager adding Podcast Feed Subscriptions Health Check feat: Improve RSS Manager adding Podcast Feed Subscriptions Health Check May 19, 2024
@pwinnski
Copy link

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.

Most (87%) items in my Podcasts library do not have autoDownloadEpisodes enabled. I would prefer for those not to be shown with a red "broken" icon, as they are very much not broken. They are complete.

This prompts me to realize that there does not currently seem to be any way to indicate in the podcasts table any difference between a podcast that is intentionally set to not auto-download and one that is set to not auto-download as a result of MaxFailedEpisodeChecks failures.

+1 on this overall manager page, though! I had to query the DB to even see how many of my podcast items were set to check their feeds. (22 out of 174)

# Conflicts:
#	client/components/widgets/PodcastDetailsEdit.vue
#	client/pages/config/rss-feeds.vue
#	client/strings/en-us.json
#	server/controllers/PodcastController.js
#	server/models/Podcast.js
#	server/routers/ApiRouter.js
#	server/utils/queries/libraryItemsPodcastFilters.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants