Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions js&css/web-accessible/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,12 @@ ImprovedTube.videoPageUpdate = function () {
ImprovedTube.playerControls();

// Initialize large playlist handler for playlist videos
if (this.getParam(location.href, 'list')) {
// Skip queue-type playlists (WL, RD, etc.) to prevent interference
var listId = this.getParam(location.href, 'list');
if (listId && listId !== 'WL' && listId !== 'RD' && listId.indexOf('RDAMVM') !== 0 && listId.indexOf('OLAK5uy_') !== 0) {
ImprovedTube.playlistLargePlaylistHandler();
} else {
// Cleanup when not on a playlist
// Cleanup when not on a playlist or on a queue-type playlist
if (typeof ImprovedTube.cleanupPlaylistHandlers === 'function') {
ImprovedTube.cleanupPlaylistHandlers();
}
Expand Down
10 changes: 10 additions & 0 deletions js&css/web-accessible/www.youtube.com/playlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,19 @@ ImprovedTube.playlistUpNextAutoplay = function () {
// currentIndex and localCurrentIndex to desync at chunk boundaries.
// This handler keeps them in sync so autoplay continues working.
// Only runs when playlist_up_next_autoplay is NOT disabled.
// ⚠️ Skip queue-type playlists (WL=Watch Later, RD=Radio, OLAK5uy_=auto-mix)
// to prevent interference with YouTube's queue autoplay behavior.
ImprovedTube.playlistLargePlaylistHandler = function() {
if (!this.getParam(location.href, 'list')) return;

// Skip queue-type playlists — these are not regular user playlists
// and the index sync logic can interfere with YouTube's queue autoplay
var listId = this.getParam(location.href, 'list');
if (listId === 'WL' || listId === 'RD' || listId.indexOf('RDAMVM') === 0 || listId.indexOf('OLAK5uy_') === 0) {
this.cleanupPlaylistHandlers();
return;
}

// Do not sync indices if the user has disabled playlist autoplay,
// because playlistUpNextAutoplay intentionally sets currentIndex
// to totalVideos to prevent the next video from playing.
Expand Down
Loading