Skip to content

Feat: Show a specific message when a playlist is unviewable - #9759

Open
Shadorc wants to merge 3 commits into
FreeTubeApp:developmentfrom
Shadorc:feat/unviewable-playlist
Open

Feat: Show a specific message when a playlist is unviewable#9759
Shadorc wants to merge 3 commits into
FreeTubeApp:developmentfrom
Shadorc:feat/unviewable-playlist

Conversation

@Shadorc

@Shadorc Shadorc commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

closes #9518

Description

Show a specific message, remove view count and video count when a playlist is private or does not exist.
I was wondering about removing the share button too but it can still make sense if someone wants to open it in YouTube instead.

Invidious message is a bit fragile because it's a parsing error rather than a handled edge case. I implemented it because the only regression that I can see is the same as with youtube.js, i.e. the message changes and we fallback to "This playlist currently has no videos"

Screenshots

Before:
image

After:
image

Testing

// removed from MR, do not test, kept as a reference

Desktop

  • OS: Bazzite
  • OS Version:
  • FreeTube version: v0.25.3-beta

Additional context

Errors thrown:

Private playlist

  • Invidious API: Could not extract playlistSidebarRenderer.
  • Local API: The playlist does not exist.

Invalid playlist:

  • Invidious API: Could not extract playlistSidebarRenderer.
  • Local API: This playlist type is unviewable.

// removed from MR, kept as a reference
Private playlist + invalid chars:

  • Invidious API: Error: non 200 status code. Youtube API returned status code 400. See <a href="https://docs.invidious.io/youtube-errors-explained/"> https://docs.invidious.io/youtube-errors-explained/</a> for troubleshooting.
  • Local API: Request to https://www.youtube.com/youtubei/v1/browse?prettyPrint=false&alt=json failed with status code 400

@FreeTubeBot
FreeTubeBot enabled auto-merge (squash) September 8, 2026 14:39
@github-actions github-actions Bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Sep 8, 2026
@absidue

absidue commented Sep 8, 2026

Copy link
Copy Markdown
Member

HTTP 400 means invalid/incorrect payload, so while yes that is returned if the user enters rubbish, it will also be returned if YouTube ever changes how playlists are fetched (e.g. requiring a real session like they did with threaded comments or adding other extra request parameters/making existing ones mandatory) so if you don't want to do a fallback you should at the very least still log the error and show the error toast for that. Hiding real errors is generally a bad idea (while there are some valid reasons for it, none of those apply to FreeTube) as it just makes it makes debugging harder and trying to get useful information out of users in bug reports is already hard enough as it is.

@absidue absidue added PR: changes requested and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Sep 8, 2026
@Shadorc

Shadorc commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

I was hesitant to add it, and you're right, it's better not to interpret a 400 error.
Edit 1: I have the same question with Invidious. I've removed the 400 handling but the other message is a parsing error, not really something that can be reliably interpreted as an unviewable playlist. I will move the console.error above
Edit 2: I'm wondering if I should completely remove Invidious part

@Shadorc Shadorc added PR: waiting for review For PRs that are complete, tested, and ready for review and removed PR: changes requested labels Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: waiting for review For PRs that are complete, tested, and ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Show a specific message when a playlist is unviewable

2 participants