Smarter next recommended video to play #4506

Open
opened 2026-02-22 10:11:47 -05:00 by deekerman · 1 comment
Owner

Originally created by @based-a-tron on GitHub (Sep 13, 2022).

Describe the problem to be solved

Autoplay is already a built in feature for peertube. However, the autoplay currently employed will very seldom recommend videos users are actually interested in watching next.

Describe the solution you would like

At the very least, the autoplay list should be sorted in a case-insensitive lexicographic manner, so that, for example,
"Peertube - Episode 2" is autoplayed after "Peertube - Episode 1," rather than playing "Peertube - Episode 3".
Videos selected at random are actually currently sorted in the reverse order, which is probably not the intended user experience.
To fill the autoplay list, we could perform an instance specific search for videos with a similar name to the video we are currently watching, possibly stripping trailing numerals (like Part 2). These videos are already sorted lexicographically.
However, a simple lexicographic sort is woefully poor at handling error. I believe that in such a sort, articles 'a', 'and' and 'the' should probably be stripped from the sorting algorithm, along with non alphanumeric character (or maybe even entire groups, excluding numerals, like [Episode 3] -> 3). Additionally, words that occur "near the end" (what does this mean?) like "Part," "Episode," or "End" or "Finale" should probably be stripped from the sort.

Further, if there are no videos that are greater in lexicographic order than the one we are currently watching, maybe we should just recommend random videos, as its likely the user has finished whatever series they were watching.

Maybe instead of any kind of lexicographic sort we should be Really Smart (r) and use a large parser to try to parse video titles for season numbers, episode numbers, parts, etc.

This is quite an extensive change. I'm left to wonder if maybe this would be better off relegated to a plugin. The issue with that, however, is that this really does feel like it should work Out of the Box (tm).

Originally created by @based-a-tron on GitHub (Sep 13, 2022). ### Describe the problem to be solved Autoplay is already a built in feature for peertube. However, the autoplay currently employed will very seldom recommend videos users are actually interested in watching next. ### Describe the solution you would like At the very least, the autoplay list should be sorted in a case-insensitive lexicographic manner, so that, for example, "Peertube - Episode 2" is autoplayed after "Peertube - Episode 1," rather than playing "Peertube - Episode 3". Videos selected at random are actually currently sorted in the reverse order, which is probably not the intended user experience. To fill the autoplay list, we could perform an instance specific search for videos with a similar name to the video we are currently watching, possibly stripping trailing numerals (like Part 2). These videos are already sorted lexicographically. However, a simple lexicographic sort is woefully poor at handling error. I believe that in such a sort, articles 'a', 'and' and 'the' should probably be stripped from the sorting algorithm, along with non alphanumeric character (or maybe even entire groups, excluding numerals, like [Episode 3] -> 3). Additionally, words that occur "near the end" (what does this mean?) like "Part," "Episode," or "End" or "Finale" should probably be stripped from the sort. Further, if there are no videos that are greater in lexicographic order than the one we are currently watching, maybe we should just recommend random videos, as its likely the user has finished whatever series they were watching. Maybe instead of any kind of lexicographic sort we should be Really Smart (r) and use a large parser to try to parse video titles for season numbers, episode numbers, parts, etc. This is quite an extensive change. I'm left to wonder if maybe this would be better off relegated to a plugin. The issue with that, however, is that this really does feel like it should work Out of the Box (tm).
Author
Owner

@GeorgeBroughton commented on GitHub (Jun 8, 2025):

I'd say this could be related to #7074 at least in terms of how it would be resolved.

@GeorgeBroughton commented on GitHub (Jun 8, 2025): I'd say this could be related to #7074 at least in terms of how it would be resolved.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/PeerTube#4506
No description provided.