Skip to content

fix: prevent large playlist handler from interfering with YouTube queue autoplay (Fixes #4228) - #4263

Open
waterWang wants to merge 1 commit into
code-charity:masterfrom
waterWang:fix/queue-autoplay-interference-4228
Open

fix: prevent large playlist handler from interfering with YouTube queue autoplay (Fixes #4228)#4263
waterWang wants to merge 1 commit into
code-charity:masterfrom
waterWang:fix/queue-autoplay-interference-4228

Conversation

@waterWang

Copy link
Copy Markdown

Fixes #4228

Problem

When the extension is enabled, YouTube keeps adding random videos to the queue when reaching the end of a queue. Disabling the extension makes the problem go away.

Root Cause

The playlistLargePlaylistHandler was being initialized for all URLs with a list parameter, including queue-type playlists (Watch Later WL, Radio RD, auto-generated mixes). The handler's index-sync logic interferes with YouTube's queue autoplay behavior, causing YouTube to add videos to the queue.

Fix

  • Skip queue-type playlists (WL, RD, RDAMVM..., OLAK5uy_...) in playlistLargePlaylistHandler
  • Skip queue-type playlists when initializing the handler in initPlayer
  • Queue-type playlists are not regular user playlists and don't need the large playlist index-sync logic

Changes

  • js&css/web-accessible/www.youtube.com/playlist.js: Added queue-type check in playlistLargePlaylistHandler
  • js&css/web-accessible/functions.js: Added queue-type check in initPlayer playlist initialization

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.

🐞YouTube keeps adding videos to the queue when the extension is enabled

1 participant