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

Fix empty channels showing up as errored with RSS #3824

Merged
merged 1 commit into from Aug 5, 2023

Conversation

absidue
Copy link
Member

@absidue absidue commented Jul 29, 2023

Fix empty channels showing up as errored with RSS

Pull Request Type

  • Bugfix

Related issue

closes #3800

Description

As we switched from the channel RSS feeds to the playlist ones, we also need to update the logic to handle empty and terminated channels. For empty channels the channel RSS feed returns an empty feed and only 404s if the channel doesn't exist e.g. it was terminated, unfortunately YouTube only creates the auto-generated playlists if the channel has the relevant tabs/content of that type, so it will 404 even if the channel still exists. To ensure that we only show errors for actually terminated and deleted channels, this pull request will fire off a HEAD request to the channel RSS feed if the playlist one 404s, that way we can supress the playlist 404s if they aren't actual errors.

I also took the opportunity to fix the CSS for the errored channels section.

This only addresses the local API, Invidious with RSS won't show any errors, even for terminated channels, due to iv-org/invidious#4021

Screenshots

before:
before

after:
after

Testing

For testing purposes I've made a profiles database with 3 channels:

  1. Download this file and rename it to profiles.db profiles.txt
  2. Close the dev version of FreeTube entirely (on macOS remember to quit it too, on windows and linux you just need to close all windows)
  3. Backup your existing dev profiles database if you want to
  4. Place the downloaded one in the correct location on the file system do not import it in the app, as that won't import the terminated channel, on Windows in dev that is %appdata%\Electron\profiles.db
  5. Launch the dev version of FreeTube (yarn dev or yarn run dev)
  6. Set the preferred API to the local one
  7. Enable Fetch feeds from RSS
  8. Refresh each subscription tab and check that it only shows the terminated channel in the errored channels list

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) July 29, 2023 15:24
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jul 29, 2023
Copy link
Collaborator

@PikachuEXE PikachuEXE left a comment

Choose a reason for hiding this comment

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

Tested
image
image

@FreeTubeBot FreeTubeBot merged commit b48d047 into FreeTubeApp:development Aug 5, 2023
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Aug 5, 2023
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Aug 5, 2023
* development: (33 commits)
  Miscellaneous CSS cleanup (FreeTubeApp#3847)
  Fix empty channels showing up as errored with RSS (FreeTubeApp#3824)
  Fix author for album playlists on the playlist page (FreeTubeApp#3838)
  Update Snap Source Host Location (FreeTubeApp#3844)
  * Show error message in popular tab when instance does not support it (FreeTubeApp#3841)
  Use video durations from the watch history for RSS (FreeTubeApp#3839)
  ! Fix unnecessary error message display in toast when paused before video started playing on load (FreeTubeApp#3835)
  Use emit and props instead of $parent (FreeTubeApp#3834)
  Add custom toast event bus for Vue 3 compatiblity (FreeTubeApp#3833)
  Fix handling of DeArrow titles (FreeTubeApp#3825)
  * Update top nav bar icon to remove focus state style (FreeTubeApp#3792)
  Update ft-input for top navbar search input to behave more like Youtube one (FreeTubeApp#3793)
  Translated using Weblate (Hungarian)
  Fix: importing subscriptions with terminated channels (FreeTubeApp#3816)
  Fix outdated subscription cache clearing code when "Remove All Subscriptions / Profiles" performed (FreeTubeApp#3817)
  Translated using Weblate (Croatian)
  Bump eslint-plugin-import from 2.27.5 to 2.28.0 (FreeTubeApp#3827)
  Bump eslint from 8.45.0 to 8.46.0 (FreeTubeApp#3829)
  Bump eslint-plugin-unicorn from 48.0.0 to 48.0.1 (FreeTubeApp#3828)
  Bump lefthook from 1.4.6 to 1.4.7 (FreeTubeApp#3830)
  ...

# Conflicts:
#	src/renderer/components/ft-list-video/ft-list-video.js
#	src/renderer/components/playlist-info/playlist-info.js
#	src/renderer/components/playlist-info/playlist-info.vue
#	src/renderer/components/watch-video-info/watch-video-info.js
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Aug 5, 2023
* feature/playlist-2023-05: (31 commits)
  Miscellaneous CSS cleanup (FreeTubeApp#3847)
  Fix empty channels showing up as errored with RSS (FreeTubeApp#3824)
  Fix author for album playlists on the playlist page (FreeTubeApp#3838)
  Update Snap Source Host Location (FreeTubeApp#3844)
  * Show error message in popular tab when instance does not support it (FreeTubeApp#3841)
  Use video durations from the watch history for RSS (FreeTubeApp#3839)
  ! Fix unnecessary error message display in toast when paused before video started playing on load (FreeTubeApp#3835)
  Use emit and props instead of $parent (FreeTubeApp#3834)
  Add custom toast event bus for Vue 3 compatiblity (FreeTubeApp#3833)
  Fix handling of DeArrow titles (FreeTubeApp#3825)
  * Update top nav bar icon to remove focus state style (FreeTubeApp#3792)
  Update ft-input for top navbar search input to behave more like Youtube one (FreeTubeApp#3793)
  Translated using Weblate (Hungarian)
  Fix: importing subscriptions with terminated channels (FreeTubeApp#3816)
  Fix outdated subscription cache clearing code when "Remove All Subscriptions / Profiles" performed (FreeTubeApp#3817)
  Translated using Weblate (Croatian)
  Bump eslint-plugin-import from 2.27.5 to 2.28.0 (FreeTubeApp#3827)
  Bump eslint from 8.45.0 to 8.46.0 (FreeTubeApp#3829)
  Bump eslint-plugin-unicorn from 48.0.0 to 48.0.1 (FreeTubeApp#3828)
  Bump lefthook from 1.4.6 to 1.4.7 (FreeTubeApp#3830)
  ...
@absidue absidue deleted the fix-empty-rss-subs branch August 5, 2023 08:04
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.

[Bug]: channels without videos = channels with errors
5 participants