evanaellio / melting-potlist Goto Github PK
View Code? Open in Web Editor NEWA web tool to generate collaborative Youtube playlists, powered by Discord OAuth
License: MIT License
A web tool to generate collaborative Youtube playlists, powered by Discord OAuth
License: MIT License
UI, UX and navigation are not optimal and sometimes clunky, it would be nice to do a bit of redesign and polish to have a more streamlined interface (that is also mobile friendly), where elements have better positions and usage is more intuitive.
Elements that can be improved :
The legacy YouTube playlist generator is still available but not easily accessible from the interface. It could be useful to still provide this option (maybe as a link in the new playlist generation tool).
On the profile playlist view, adding a checkbox or open eye / closed eye icon next to each category (tracks, deleted tracks , unavailable tracks) to allow filtering tracks and showing only some of them could be useful to quickly identify deleted and unavailable tracks for long playlists.
Song tracking is based on user tracks, so when a user deletes one of their song the tracking information is lost.
Instead, tracking should be done on track URI, so that it's not dependent on user tracks, it would also allow to simplify code for statistics aggregation during next song weighted selection.
Sometimes, all the people that want to listen to some music are not all on the same Discord servers.
This would allow someone with access to several Discord servers to select them and invite people across different servers.
When using Discord OAuth to login, an error 500 is returned. The logs indicate Scope has changed from "guilds identify" to "email guilds identify"
.
It's possible that Discord added email to the default scopes.
Microsoft Edge doesn't seem to support video streams from googlevideo.com (DOMException: The element has no supported sources.
)
Audio still works.
Using an external API (like https://www.discogs.com/developers) to fetch song metadata would allow to get more accurate information than using only YouTube data.
A demo mode would be practical in order to showcase how the tool works and to allow interested people to test it by themselves.
Demo instance could be setup to auto clean and reset itself at fixed intervals in order to avoid cluttering up the database.
Users that don't have a Discord account should be able to connect using dummy/guest accounts (should be easier once #35 is done).
A skip button could be used to go to the next song. If the song is skipped before stat tracking happened (30 seconds into the video), then no statistics should be tracked.
Some people are not on Discord and might want to participate to the music being played, this would allow them to join a playlist temporarily by adding their own playlist or individual songs to the generation.
The host can generate a QR code to make them join in a simple way from mobile.
Issue found on quotes (") and apostrophes.
Add a way for several people to connect to the same playlist and vote to skip a song (once the majority of people wanting to skip a song has been reached).
Two ways to vote could be implemented :
When playing a playlist on a desktop computer, or mobile device connected to an audio setup, it would be practical to be able to remote control the player from another device (add/remove people, play/pause, ...)
Possible technical implementation :
Add a way to share the playlist playback across multiple devices, so everyone can get the best audio quality
Add a text tutorial to guide first time users and explain to them how the app works.
When a user changes their Discord profile picture, Melting Potlist will still try to show their previous profile picture (now appearing as a missing image).
The shown profile picture will only be updated after a successful login from this user.
Add another type of playlist (not synchronized from YouTube) that is handled manually, by adding each song individually.
Due to the new method for identifying deleted songs from YouTube, it is no longer possible to remove them from a synchronized playlist once they're registered as deleted, although it is still possible on the original YouTube playlist.
Possible fix : add a remove button in the playlist view (only for deleted songs).
Weight uses the user track instead of the track uri, so the exact same song could have different weights depending on the user that provided it.
It would be better to merge all tracked statistics for a given track uri before computing weights.
The custom player doesn't look that great on mobile (too much spacing between elements).
Suggestion : when on mobile, the video only shows when using landscape mode, and is always in fullscreen.
Resources :
https://github.com/selwin/django-user_agents (to detect if the device is mobile or not)
https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent (for other detection solutions)
A harcoded limit is blocking any video from appearing if they are placed after the 10th video on a user's playlist.
Currently, the listening stats of every active user in the playlist are taken into account when selecting the next song to play.
A user setting could be added to choose between two options :
Or rather than a binary option, it could be a ratio deciding how much weight to attribute to your listening stats vs other listening stats (only for your songs), which would be 1 by default (every user has the same weight).
/!\ Weight ratio calculations should use multiplication when personal weight is >= 1 and division when personal weight is < 1
If a user has longer songs and another one shorter ones, in the long run the listen time will be unbalanced. In order to avoid this, it would be interesting to track time played for each user and occasionally skip their turn if they have used more time.
We could also initialize subsequent playlists by analyzing the state where the playlist stopped (which users were active and not yet played in rotation) in order to balance rotations across different playlists.
/!\ If someone uses very short videos, they shouldn't be able to play many of them without anyone else being able to play music (maybe count with a minimum time ?).
Can be used to skip intros and outros that aren't part of the music (for a music video, or if there's silence at the beginning or end), or to make shorter edits of long songs.
Maybe implement fade in/out to avoid sudden transitions.
For instance :
Could be displayed in a collapsible card below the audio/video player.
Implement a Discord audio bot that will stream the audio in a chosen voice channel, to avoid the playlist host streaming his entire screen.
Can be coupled with #56 for easier integration.
For example https://youtube.com/watch?v=hS40ombuqP0 is unavailable but playlist synchronization doesn't consider it deleted.
Add a global jukebox, a media player that takes random songs from every user in Melting Potlist in order to discover even more music.
When adding a Youtube playlist, if a Spotify link (or any link other than Youtube) is provided, the server responds with an error 500.
Refactoring playlist management to use a new API would allow to fix this and improve maintainability.
Using youtube-dl should allow to use plenty of different music/video providers.
Might be complicated to use for Spotify : could be worked around by finding matching songs on YouTube for a Spotify playlist ?
Add a way to search for a specific song in a given Discord server, and get information about this song (who provided it, when it was played, ...)
Due to technical limitations (unable to determine if play/pause event was triggered by user action or by script), the audio player is currently the only way to control playback, and in fullscreen mode the pause buttons only pauses the video and not the audio.
The main issue is that the video pause event is triggered when switching tabs and minimizing window, which make it seem like the user clicked the pause button.
Alternative options :
Support for any number of playlists per user will make it possible to support more types of user workflows.
Each playlist could be toggled on or off depending on what the user wants to include in its selection.
In order to match video player standards, it would be useful to be able to double click to make a video fullscreen.
For songs you dont want to listen to right now but still want to keep for later, an option to disable some songs from a user playlist would be interesting.
Examples of rule-based selection of songs :
The rule system could use a generic tag system to support multiple user workflows.
Custom rules shall be completely up to the user but commonly used rules can be automatically added or suggested.
In order to avoid manually adding or removing people when listening to a playlist while in a Discord voice channel, it would be interesting to attach a playlist to this channel and update active users based on who is present in the channel (and has a Melting Potlist profile).
For an automated approach to the editing introduced in #27 , it would be interesting to setup beginning and ending cuts based on empty sound, by downloading and analyzing the audio.
This feature should be opt-in, only a manual action should trigger the analysis (for a specific song or an entire playlist).
Song tracking would be very useful to avoid too much randomness/repetition in song selection over several playlists.
The basic use case would be to add an optional prioritization of songs that were never played in a previous playlist (with a reset for a user when all their songs have been played).
Implementation ideas :
Generated YouTube playlists URLs are of the form https://consent.youtube.com/ml?continue=https://www.youtube.com/watch?... which is not practical.
Between the time a song is selected for playback and the time it's tracked, if the user has deleted it, the tracking won't work and the player will stop working unless reloading the webpage.
Note : might be easier to fix once #69 is fixed, by submitting the track's URI instead of its internal Melting Potlist ID.
To analyze, Youtube probably changed the structure or location of their page data.
A temporary workaround was added to be able to generate playlists without first synchronizing all participants' playlists.
Persist song metadata in database when a user saves their list.
This could be used later to alert the user that a song he previously added was since removed from Youtube.
This could also be used to track which songs were played and to keep the history of generated playlists.
Suggestion : extract song metadata using external service (MusicBrainz ?).
Dynamic playlists are saved in the database but never shown to the user.
It would be useful to show a page for each group with some info and the generated playlists.
This would allow to see previous playlists, for instance if someone remembers liking a particular song but can't find it anymore.
Maybe archive some playlists after a while in order to avoid clutter ?
Could also allow to implement a like button ?
The custom media player could be used to play any song/playlist from YouTube (for instance to play age-restrict videos or music audio in background on mobile).
The page should be mostly standalone and shouldn't require authentication.
If possible, use the same format of URL query params as YouTube to be able to quickly switch from YouTube to Melting Potlist player, and also provide a handy bookmarklet to do it automatically.
An automatic blind test could be done using the different playlists of all users who are participating.
Some videos are using DASH-MPEG and cannot be played by standard HTML video player. For the moment a warning is displayed and only the audio player is shown.
Microsoft doc on how to implement DASH-MPEG playback : https://docs.microsoft.com/en-us/azure/media-services/previous/media-services-embed-mpeg-dash-in-html5
Provide at least project purpose and installation instructions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.