Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

Playlist command #599

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Playlist command #599

wants to merge 2 commits into from

Conversation

kthezelais
Copy link

@kthezelais kthezelais commented Dec 9, 2019

I add a playlist command. This feature is used to store tracks into a parallel list of the queue, and this list of tracks can be run on the queue when the user use the command ;;playlist run.

You can find some details on how to use this new command below :

The command ;;playlist Allows you to configure the playlist:

- add <search>: add a title from a search. Then enter the command ;;playlist [1-5] to choose a title from the search list.

- copy: copy the queue into the playlist. If the playlist is not empty, enter the command ;;playlist [1-2] (1: overwrite the playlist, 2: do nothing).

- list: display title's list of the playlist.

- remove <option>: delete one or more titles from the playlist:
     - without option: displays the list of titles in the playlist.
     - all: delete all the titles in the playlist.
     - <number>: delete the title associated with the <number> parameter.

- run <option>: adds all the titles from playlist to the queue.
     - without option: add the titles in order.
     - random: add the titles in the mess.

@claassistantio
Copy link

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Killian THEZELAIS seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.


public class PlayListCommand extends JCommand implements IMusicCommand, ICommandRestricted {

private List<AudioTrackContext> playlist;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fundamentally doesn't work. You're sharing the same playlist between everyone. It also doesn't persist between restarts.

Doing something like this this the right way would require working with the database, and even then I would do things differently.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants