FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

Update single user playlist view to remove videos immediately on exit

Open PikachuEXE opened this issue 6 months ago • 1 comments

Pull Request Type

  • [x] Bugfix
  • [x] Feature Implementation
  • [ ] Documentation
  • [ ] Other

Related issue

Undo introduced in https://github.com/FreeTubeApp/FreeTube/pull/5885 Closes https://github.com/FreeTubeApp/FreeTube/issues/6934

Description

  1. Error raised if out of playlist view when scheduled task for actual removing videos from playlist run
  2. IMO annoying to need to stay in the view for 5s when I am just trying to remove 1 finished video and play another one Undo still useful for removing multiple videos

Screenshot 2025-06-10 at 09 19 35

This PR makes single playlist view remove videos queued for removal after 5s to be removed immediately once

Screenshots

Testing

  • Create some really long user playlist (easier for testing, e.g. copy one from LTT long playlist
  • Create 2+ windows to ensure change sync (optional, nothing changed on that side
  • Remove 2+ videos, undo, ensure all removal undone (no change on other windows
  • Remove 2+ videos, wait 5s, repeat N times, ensure videos are really removed (can go to another view and back to ensure
  • Remove 2+ videos, exit view immediately (go back to playlists view or about/settings view or start playing one of the items) Ensure videos removed and toast closed on view changed (no longer able to undo)
  • Video count shown in playlist info should be updated immediately after remove (before actual remove/undo)

See test cases from https://github.com/FreeTubeApp/FreeTube/pull/7099 too

Desktop

  • OS:
  • OS Version:
  • FreeTube version:

Additional context

PikachuEXE avatar Jun 10 '25 02:06 PikachuEXE

So the total watch time gets updated immediately but video count not. Best to also update the video count.

Addressed

It says "Video" has been removed but i removed multiple.

Not related to the issue. Maybe someone can create a followup PR? :)

Video count doesn't get updated on playlist page

More unrelated to this issue than the above one. That's asking for instant update of local playlist attributes and I dunno if performance would be worse (and I don't see a need for instant update

PikachuEXE avatar Jun 11 '25 01:06 PikachuEXE

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Jun 26 '25 02:06 github-actions[bot]

@ChunkyProgrammer ~

PikachuEXE avatar Jul 03 '25 22:07 PikachuEXE