Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to remove videos from playlist playback queue #6971

Conversation

nihalxkumar
Copy link

@nihalxkumar nihalxkumar commented Mar 4, 2025

Ability to remove videos from playlists while they're in the playback/queue

The changes allow users to:

  1. Remove videos from playlists while they're playing
  2. Undo the removal within 5 seconds if they change their mind
  3. Keep track of the video that was playing if it was removed

The functionality matches the existing playlist removal behavior from the main playlist view, but now it's available while watching videos too.

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

Closes #6968

Description

  1. Added the can-remove-from-playlist prop to the ft-list-video-numbered component in the watch video playlist template, which will be true for user playlists
  2. Added the remove-from-playlist event handler to handle video removal
  3. Added the handleRemoveFromPlaylist method that:
    • Checks if it's a user playlist
    • Stores a temporary copy of the playlist items for undo functionality
    • Removes the video from the playlist
    • Shows a toast notification with undo option
    • After 5 seconds, if undo wasn't clicked, permanently removes the video from the playlist
    • Handles the case where the currently playing video is removed by storing it in prevVideoBeforeDeletion
  4. Added the necessary Vuex actions for playlist manipulation

Screenshots

An always visible delete icon
image
An option to remove from more options
image

Testing

Desktop

  • OS: EndeavourOS x84_64
  • OS Version: Linux 6.13.5-arch1-1
  • FreeTube version: 0.23.2-1 from AUR

Additional context

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Mar 4, 2025
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) March 4, 2025 10:31
Copy link
Member

Choose a reason for hiding this comment

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

An option to remove from more options

I would like to see this removed as mention in another issue before adding yet another option in the more options menu only overcrowds that menu even more. I think adding the trash icon is more than enough.

@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc added PR: changes requested and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Mar 4, 2025
@nihalxkumar
Copy link
Author

I would like to see this removed as mention in another issue before adding yet another option in the more options menu only overcrowds that menu even more. I think adding the trash icon is more than enough.

Fair. I added it to match how YouTube does it. Just going with Trash Icon would be better.

auto-merge was automatically disabled March 5, 2025 12:47

Head branch was pushed to by a user without write access

@nihalxkumar nihalxkumar force-pushed the removeplaylistvideo-nihalxkumar branch from 04628e1 to 2632421 Compare March 5, 2025 12:47
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) March 5, 2025 12:47
@nihalxkumar nihalxkumar changed the title Add Remove from playlist to dropdown options Add option to remove videos from playlist playback queue Mar 5, 2025
@efb4f5ff-1298-471a-8973-3d47447115dc

Thinking about this again. I think the behavior of this pr would probably be highly confusing for users. Why?

  • Users might think they are removing it from a queue and find out later that they have deleted the video from the playlist.
  • All playlist related controls like deleting a video only resides within the playlist itself
  • This feature would also be removed when we actually implement queuing + dynamic playlists Dynamic Playlists/Watch Queue #547

@nihalxkumar
Copy link
Author

Alright

auto-merge was automatically disabled March 10, 2025 19:02

Pull request was closed

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.

[Feature Request]: Remove Video option in Playlists
2 participants