FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

Enhancement : Skip Play Next Video when already in History

Open mgth opened this issue 7 years ago • 13 comments

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.

mgth avatar Oct 03 '19 20:10 mgth

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

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.

GilgusMaximus avatar Apr 21 '21 18:04 GilgusMaximus

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?

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

Svallinn avatar Apr 21 '21 19:04 Svallinn

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.

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

GilgusMaximus avatar Apr 22 '21 17:04 GilgusMaximus

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).

Tiltowait2 avatar Jun 24 '21 14:06 Tiltowait2

can I make a PR with this feature?

dev-stupid-codes avatar Nov 10 '22 13:11 dev-stupid-codes

@dev-stupid-codes yes u can :)

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 avatar Nov 26 '23 02:11 kommunarr

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

kommunarr avatar Nov 26 '23 02:11 kommunarr

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.

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.

kommunarr avatar Nov 26 '23 14:11 kommunarr