Code Monkey home page Code Monkey logo

melting-potlist's Introduction

Melting Potlist

Melting Potlist is a playlist generator with an integrated audio & video player to help get some music going quickly.

How does it work

  • Users can login to Melting Potlist using Discord OAuth
  • Logged in users can configure one or more playlists by importing them from Youtube
  • The playlists are regularly kept in sync so that adding songs to the Youtube playlist is enough to make them playable
  • Whenever you need to play some music, simply select one or more Discord servers where your friends are, choose who will be included and a playlist will be generated on the fly
  • Generated playlists are made randomly from songs of selected people, while keeping the song selection fair for everyone

Features

  • Generated playlists are fully dynamic and can be updated while they are playing, it's also possible to add or remove people while it's playing
  • Audio and video playback can be synchronized between several people, mostly useful when playing music with remote people
  • Video availability on Youtube is tracked, so that you're warned if one of your songs is deleted, you can also check what was the title and artist
  • Individual playlists can be enabled or disabled to adapt to the mood or the group

melting-potlist's People

Contributors

dependabot[bot] avatar evanaellio avatar salier13 avatar teanan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

melting-potlist's Issues

Track played songs using a custom media player

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 :

  • Browser plugin to track played songs on YouTube (not mobile friendly)
  • Manually indicate the last song played for a given playlist directly from Melting Potlist (can be roughly estimated by comparing time spent listening with song durations)
  • Custom YouTube player that can track played songs
  • Last.fm integration (to avoid creating yet another browser plugin)
  • A combination of the above

Wrong scopes with Discord OAuth

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.

Improve navigation and UI/UX

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 :

  • Navigation menu (unintuitive to click on your profile picture without any indication of a hidden menu)
  • Custom video player (buttons and elements are not placed very well)

Independent media player

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.

Global jukebox

Add a global jukebox, a media player that takes random songs from every user in Melting Potlist in order to discover even more music.

Choose to take other users listening stats into account or not

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 :

  • Take other user's listening stats to weight songs (when you want other users to discover more of your songs, which could induce repetition when playing with different groups of people)
  • Only take my own listening stats to weight songs (when you don't want too much repetition of your own songs across different groups of people)

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

Remote control from another device or with an API

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 :

  • HTTP long polling (frequent API requests to check if something needs to be updated) -> consumes processing and bandwidth even when nothing happens
  • Websockets (with Django Channels) -> might disconnect if the user turns off his screen on mobile (primus/primus#350)

Blind test mode

An automatic blind test could be done using the different playlists of all users who are participating.

Stream audio using Discord bot

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.

Vote to skip a song

Pre-requisites : #47 and #40

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 :

  • Skip temporarily (I don't want to listen to this now)
  • Skip permanently / dislike (I don't want to listen to this ever again)

Detect users in Discord voice channel

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

Showcase/demo mode

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

Reverse search songs

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

Add a README

Provide at least project purpose and installation instructions.

Cut beginning and ending of songs

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.

No video playback on Edge

Microsoft Edge doesn't seem to support video streams from googlevideo.com (DOMException: The element has no supported sources.)

Audio still works.

Song tracking isn't kept if song is deleted

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.

Add anonymous/guest users to a playlist

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.

Video player play/pause doesn't control audio playback when in fullscreen

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 :

Link to access legacy playlist generator

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

Show generated playlists for a group

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 ?

Manually configure playlist

Add another type of playlist (not synchronized from YouTube) that is handled manually, by adding each song individually.

Add support for multiple user playlists

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.

Missing image for user after profile picture update

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 a "Watch party" feature

Add a way to share the playlist playback across multiple devices, so everyone can get the best audio quality

Better balance between different users for song playtime

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

Youtube playlist synchronization is broken

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.

Automatically detect blanks to setup shorter video edit

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

Temporarily disable songs

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.

Additional music providers

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 ?

Tracking doesn't work if playing song was deleted from the user playlist

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.

Add rule-based selection of songs

Examples of rule-based selection of songs :

  • Separating songs that should be included in every playlist generation and ones that are specific to a particular Discord server
  • Limiting the number of songs taken from a particular genre or artist
  • Making recently added songs guaranteed to be included in the next playlist generation
  • Applying different selection weights

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.

Skip current song

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.

Can't remove deleted songs from playlist

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

No validation of playlist URL

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.

Save playlist songs metadata

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.