Skip to content

feat(genre-tree): grey out and skip unplayable YouTube tracks - #193

Merged
Andreas-Garcia merged 1 commit into
developfrom
feature/youtube-unplayable-tracks
Oct 3, 2026
Merged

Andreas-Garcia merged 1 commit into
developfrom
feature/youtube-unplayable-tracks

Conversation

@Andreas-Garcia

Copy link
Copy Markdown
Member

Summary

grow's player hit YouTube error 150 (embedding disabled). Unplayable YouTube tracks are now flagged from end to end instead of being dropped. They stay listed but greyed out with the reason, can't be played, and auto-advance skips them. A video that fails at runtime shows the error and the player moves on to the next track.

Changes

  • Schema: YoutubeTrackDetailedSchema gains youtubeUnplayableReason, which is nullable, uses the not_found | not_embeddable | private | not_processed | region_whitelisted enum, and defaults to null when an older API leaves the key out. The new unplayableReasonLabel(track) returns the display label or null.
  • GenrePlaylistTracks: a flagged row gets opacity-50, shows the reason as small text and a title, and has a disabled/aria-disabled play button with no onClick.
  • TrackItem (sidebar): same greyed treatment with the reason. The position cell can't be clicked.
  • TrackListContext: playNewTrackListFromGenrePlaylist starts at the first playable track at or after startIndex.
  • PlayerContext: adds optional YoutubePlayerTrack.unplayableReason. handleNextTrack / handlePreviousTrack skip tracks that set it. YouTube onError sets loadError (100 "Video not found"; 101/150 "Embedding disabled by the video owner"; otherwise "YouTube playback error (code N)"), stops playback and fires onTrackEnd. This replaces the old console.error.

Consumers must map youtubeUnplayableReason to PlayerTrack.unplayableReason in their toPlayerTrack for the next/previous skip to apply.

Test plan

  • pnpm lint (tsc)
  • pnpm test: 618 tests pass and coverage thresholds are met. New tests cover the schema default and enum, the label helper, greyed rows in both lists, the start-index skip, next/previous skip, and the onError messages plus advance.
  • pnpm build

🤖 Generated with Claude Code

… playback

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 3, 2026 15:18
@Andreas-Garcia
Andreas-Garcia merged commit 9884353 into develop Oct 3, 2026
2 of 3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

2 participants