Skip to content

Fix playing wrong item after deleting first item in playlist#8612

Merged
FreeTubeBot merged 3 commits intoFreeTubeApp:developmentfrom
PikachuEXE:fix/playlist-next-prev-video-after-delete
Feb 17, 2026
Merged

Fix playing wrong item after deleting first item in playlist#8612
FreeTubeBot merged 3 commits intoFreeTubeApp:developmentfrom
PikachuEXE:fix/playlist-next-prev-video-after-delete

Conversation

@PikachuEXE
Copy link
Member

@PikachuEXE PikachuEXE commented Jan 31, 2026

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

Closes #8579

Description

Fix playing wrong item after deleting first item in playlist (same as title
See issue for details
Caused by #5158 due to previous item assigned as first item in playlist after deletion (see example below)

Playlist before delete

  • A
  • B
  • C

Playlist after delete

  • B (problematic code points preview video to 1st item which is wrong)
  • C

Screenshots

Lazy, test yourself

Testing

A. No shuffle
(1) First item

  • Open random playlist
  • Open 1st item in new window
  • Go back to playlist delete 1st item
  • Play next item to ensure it's 2nd item (well 1st item after playlist updated)
  • Repeat last 2 steps but test playing prev item to ensure last item played

(2) Not first item

  • Open random playlist
  • Open nth (not 1st) item in new window
  • Go back to playlist delete the same item
  • Test play next/prev item to ensure it works as the same as before

B. No shuffle
Similar to (A)?

Desktop

  • OS:
  • OS Version:
  • FreeTube version:

Additional context

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) January 31, 2026 20:44
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jan 31, 2026
absidue
absidue previously approved these changes Feb 1, 2026
Copy link
Member

Choose a reason for hiding this comment

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

It has some issues with shuffle enabled

VirtualBoxVM_ZTRwXKlftK.mp4
VirtualBoxVM_UaWQzgYCGA.mp4

@PikachuEXE
Copy link
Member Author

@efb4f5ff-1298-471a-8973-3d47447115dc Fixed the error

@efb4f5ff-1298-471a-8973-3d47447115dc

New issue? Maybe underlying issue surfaced after fix?

VirtualBoxVM_fNiBTVr2Dt.mp4

@PikachuEXE
Copy link
Member Author

Ok now I think I understand better on the shuffled items
The shuffling logic doesn't handle the case that when current video is removed from the playlist well, so a change is needed there
Please retest all shuffle cases

@FreeTubeBot FreeTubeBot merged commit a6f48f8 into FreeTubeApp:development Feb 17, 2026
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 Feb 17, 2026
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]: Playlist queue skips the next video when deleting the current video playing.

5 participants