-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seperate Invidious playlists #114
Comments
There's got to be a better way of specifying weights - perhaps each edge can have an optional weight, like "edges":
[
"AAAAAAAAAAB",
{
"id": "AAAAAAAAAAC",
"weight": 3 # default weight: 1
},
"PL0000000000000000"
] We'd also need to specify that we play a random video from the playlist-edge, or we play from the N-th video. Also we'll probably need to specify something like an inverse selection, such as "Play the next video from "edges":
[
{
"id": "PL0000000000000000",
"start": "random", # can also give a number to start from
"inverse":
[
"AAAAAAAAAAB",
"PL0000000000000001"
] # don't play any of these, if you decide on this playlist
},
{
"id": "AAAAAAAAAAB",
"weight": 8
}
] A practical example: In this case, you'll have to specify many things to add a new music to
There's some edge-cases, like a genre only having 5 songs. In this case, a .95 chance will be very repetitive, so we need to adjust the weights better. But when we add a 6-th song, we need to re-adjust the weight of Another practical example: In this case, you'll have to specify a few things to add a new upload to
For extra pain, we can also specify a weight needed to start a series. They are long, and thus they should be started less frequently than a standalone video. For example, This could be done with a I know all of these examples are advanced, and take time to maintain, but let's be fair - a regular playlist gets the job done 99.9% of the time, and we can't really avoid any of the steps listed here. Also these examples highlight the need for practical functionality such as copy-paste, a fast and easy interface for selecting edges and weights, changing edges on many videos at the same time, and creating "utility" playlists that should not appear as proper playlists. You could also create your own version of "Mix" from videos using this system - play the first recommended video with a 1/2 chance, play the second with a 1/4 chance, third with 1/8 and so on. |
Thank you very much for your thoughts! Obviously something like this can quickly become difficult to reason about, but I think there's so many useful applications it's worth exploring. Some thoughts on handling the examples outlined: Each node has certain I think a client would have to keep track of their [
{
"id": "AAAAAAAAAAA"
},
{
"id": "PL0000000000000001",
},
{
"id": "AAAAAAAAAAB"
}
] After finishing I agree having I think accessing playlists in the way that is suggested above could also be done as "edges":
[
{
"id": "PL0000000000000001",
"index": 10,
"order": "random"
// "order": "list"
] Which would start the playlist Here's how I would work through the first example: "edges": [
{
"id": "PL_THIS_GENRE",
"weight": 95,
"order": "random_unique" // Similar to the example above
},
{
"id": "PL_FAVORITE_MUSIC",
"weight": 5
}
] Then "edges": [
{
"id": "PL_GENRE1"
},
{
"id": "PL_GENRE2"
},
//...
] Which should do everything that you outlined. Wanting to add a new video to I can see keeping track of playlists in this way quickly becoming cumbersome though. For the second example I would create the playlist "edges": [
{
"id": "AAAAAAAAAAA"
},
{
"id": "AAAAAAAAAAB"
},
//...
{
"id": "PL_LINUSTECH",
"order": "random"
}
] Which should hopefully do almost everything specified. To add a new video to the playlists, you would add it to I can see this becoming a very difficult thing to reason about and control. To start to implement this, I would probably only make it possible to do the following: "edges": [
{
"id": "AAAAAAAAAAA"
},
{
"id": "AAAAAAAAAAB",
"weight": 4,
}
] Which provides minimal functionality but I think is still useful. The main issue I think is handling everything properly on the client side. A client has to juggle quite a bit of information. I can quickly see something like this becoming Turing-complete, which could almost be achieved by some of the features mentioned. For managing and creating these playlists, it would probably be easiest to type everything by hand, like what we've been doing here, and have that as something closer to an |
For #18 it's necessary for each video in a playlist to hold extra data, essentially a
edges
field that would hold an array of videos (or playlist) that the current video can link to. An example of a video in a playlist would look like:After watching the video, the client can choose between the video
AAAAAAAAAAB
, or playlistPL0000000000000000
. I'd recommend taking a look at https://www.python.org/doc/essays/graphs/ for more info on how this would be implemented. Complex loops and other behavior would be made possible with this structure that wouldn't be possible with YouTube's lists.Assuming the next video is chosen randomly from the edges provided, it should be possible for the user to specify an edge multiple times, so e.g. specifying
["AAAAAAAAAAA", "AAAAAAAAAAA", "AAAAAAAAAAB"]
in the example above would have a2/3
chance of looping the video again.In addition, this would allow an Invidious user to create their own playlists. A
Favorites
andWatched
playlist could be provided like this.I'd be interested in hearing feedback about how this should be implemented to provide as much flexibility and functionality to users.
The text was updated successfully, but these errors were encountered: