FreeTubeApp / FreeTube

An Open Source YouTube app for privacy
https://freetubeapp.io/
GNU Affero General Public License v3.0
13.7k stars 868 forks source link

Enhancement : Skip Play Next Video when already in History #397

Closed mgth closed 1 year ago

mgth commented 5 years ago

Play next video is cool, but youtube give you ever and ever the same videos. It would be nice to discard already seen videos from auto play.

efb4f5ff-1298-471a-8973-3d47447115dc commented 3 years ago

Hi there @mgth just a quick question to clarify for myself. Are u talking about the feature that represent the highlighted button in the middle of the picture? Or about the autoplay feature?

Im asking this because ur first sentence is mentioning play next video and ur second is mentioning autoplay. They are two separate features.

FT #397 - highlighted

GilgusMaximus commented 3 years ago

The problem he describes is that e.g. you watch 'Cool videos about cats' and have autoplay enabled. The first video in the list is 'Cool videos about cats 2'. So you watch that next because autoplay is active. But on the view page of 'Cool videos about cats 2', the first recommended video is 'Cool videos about cats'. So you are stuck in an endless loop of autoplaying the same two videos.

A solution could be that you move one video, which is in the recommended list but not in your watch history list, up to the top of the recommended list before displaying them.

efb4f5ff-1298-471a-8973-3d47447115dc commented 3 years ago

Ah okay thanks for clarifying. So when autoplay is enabled a new array is created for all the videos that being watched and when u disable autoplay the array will be cleared?

One thing that is bugging me tho is What will happen if all the videos that are being recommended are already in the array?

Svallinn commented 3 years ago

All of those nuances would have to be ironed out in discussion. None of us has really touched this potential feature/fix yet.

efb4f5ff-1298-471a-8973-3d47447115dc commented 3 years ago

I think this is a valuable feature because Youtube / Freetube often get used as a music player. It would be really annoying if u would be stuck in an endless loop of the same 2 songs.

GilgusMaximus commented 3 years ago

Ah okay thanks for clarifying. So when autoplay is enabled a new array is created for all the videos that being watched and when u disable autoplay the array will be cleared?

I did not look into the code, but I am quite certain that the array is always there, because the recommendations are always received from the yt-dl-core module when you request a video page. But only if autoplay is activated, the app automatically redirects to the first video in that array

Tiltowait2 commented 3 years ago

Sometimes I like to go to sleep listening to podcasts. I'll check "Autoplay" to let it run all night. The first video will come to an end and play the video it decides fits best next. Unfortunately, sometimes the software will decide that the best match to that video is the one I just watched. Then it will loop, playing the same two videos.

I think once a video has been played in a single autoplay list, it may not be played again. If autoplay is disabled, then the next time autoplay is clicked, it could come up again (if it's relevant).

dev-stupid-codes commented 2 years ago

can I make a PR with this feature?

efb4f5ff-1298-471a-8973-3d47447115dc commented 2 years ago

@dev-stupid-codes yes u can :)

kommunarr commented 1 year ago

My opinion on this: in the same vein as Gilgus's suggestion, order recs by unwatched first on load (in a way that doesn't change the order if you mark/unmark those vids as watched later on while still on the same route). I also don't think it should be a setting, as I can't imagine a user for which this feature would be undesirable. If someone can conjure a good reasoning for keeping the option to disable the behavior, though, can be made into an enabled-by-default option.

kommunarr commented 1 year ago

Here's what I coded up to implement this; will not make a PR yet if people want to iron out different details first.

efb4f5ff-1298-471a-8973-3d47447115dc commented 1 year ago

I also don't think it should be a setting

IMO this feature should only apply to the recommended list and indeed doesn't need a toggle

But will this also apply to playlists? If so than it should be a setting.

kommunarr commented 1 year ago

No,this has to do wiith recommended videos and the problem of infinite looping. Not sure what the use case would be for playlists, so I wouldn't want to consider that unless there is tangible demand for that.