FreeTubeApp / FreeTubeApp/FreeTube
[Feature Request]: Make "Remove Watched Videos" constant
- Dominant language
- Vue
- Stars
- 21.9k
- Forks
- 1.5k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 62
Description
### Guidelines
- [X] I have searched the issue tracker for [open](https://github.com/FreeTubeApp/FreeTube/issues?q=is%3Aopen+is%3Aissue) and [closed](https://github.com/FreeTubeApp/FreeTube/issues?q=is%3Aissue+is%3Aclosed) issues that are similar to the feature request I want to file, without success.
- [X] I have searched the [documentation](https://docs.freetubeapp.io/) for information that matches the description of the feature request I want to file, without success.
- [X] This issue contains only one feature request.
### Problem Description
I watch my videos in my Quick Bookmark playlist one at a time, removing the video I'm currently watching and onto the next one. I like to keep my playlists clean of the videos I've already watched, and this is currently one of the most efficient ways to do it.
You might think that the "Remove Watched Videos" feature is perfect for this, but the main problem is that you have to manually click it every single time you want that change to take effect. Counting the prompt, that's two clicks, and you'll have to do them on a regular basis to keep your playlist clean of watched videos. My existing solution on doing it manually on every video as I watch it is better at keeping it consistently "clean," but it requires manual conscientiousness in my flow to remember to check it, and I can't have autoplay enabled because I don't always have the reaction time to do the manual step at the end of a video.
It would be optimal if I could have a "set it and forget it" way of removing watched videos.
### Proposed Solution
Add a "Remove Videos As They Are Watched" toggle button. When the toggle is set to `false` and then interacted with, the existing prompt appears (with language modified from `Are you sure you want to remove all watched videos from this playlist? This cannot be undone.` to `Do you also want to remove all existing watched videos from this playlist? This cannot be undone.`). The options are Yes and No (instead of the current "Cancel"). Same as before, if they select "Yes", their watched videos are removed. But regardless of their selection, the toggle is now enabled, and new videos they save will be removed as they watch them.
This new toggle button replaces the "Remove Watched Videos" icon button.
The check for whether to remove the video on watch will be evaluated only when the video is set from Not Watched to Watched, not Watched -> Watched. This means that you can choose to manually keep a video even while you're watching it through the Add to Playlist and Quick Bookmark buttons in `watch-video-info`, or videos you've already watched.
To check whether the current video is a member of a playlist with this setting enabled, and enact the change for all matching playlists, is O(p * max(pn)), where p is the number of playlists, and pn is the number of videos in a given playlist. This would result in **colossal** load times on video pages for users who have this setting enabled on multiple large user playlists whenever they Mark as Watched or open up any random video. As a result, there are two ways we can implement this without risking a sizable detriment to the user experience:
1. Wait until the Vue 3 migration is complete (#4428), and we can use [Maps and/or Sets](https://github.com/FreeTubeApp/FreeTube/projects/10#card-92400979) to make this O(p * max(pn)) problem an O(p) one, or even better than that in the average case depending on the implementation.
2. Something a bit more hacky like "only allow one playlist to have this setting enabled" as a rule (not a fan).
I strongly opt for option 1 and keeping this feature request on ice until then.
### Alternatives Considered
The Quick Bookmark icon on `watch-video-info` will have to be disabled if this setting is active on the Quick Bookmark target. The playlists with this setting enabled in the add video to playlist prompt will show as disabled.
### Issue Labels
ease of use improvement, improvement to existing feature
### Additional Information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.