Red-discordbot: Future Audio Work

Created on 18 Aug 2019  路  45Comments  路  Source: Cog-Creators/Red-DiscordBot

This issue is to gather features to be suggested for or worked on for Audio this supersedes and replaces #2494 due to the changes added by #2904

Open Issues:

  • [ ] Lavalink status (#1811)
  • [ ] Document Lavalink setup with multiple instances (#2843) (This could also send a message to the bot owner)

TODO:

  • [ ] Queue: move songs up and down the list by number of songs (#621)
  • [ ] Break Search command into multiple subcommands
  • [ ] Autojoin/bind (a command to bind the bot to a text channel and a voice channel for the duration of the audio session), also setting a lock on the audio set notify channel via this method, pinned queue
  • [ ] Wastebin lists of links to tracks
  • [ ] Remove multiple songs at once
  • [ ] Make Queue aware when enqueuing playlists and/or albums
  • [ ] Add more dispatches
  • [ ] Add more public APIs to allow for more Audio add-ons

Requests:

  • [ ] Configurable limit on max concurrent audio streams (#272)
  • [ ] Make playlist remember where it was stopped? (#1544)
  • [ ] Spotify Search command
  • [ ] Google Play Music Support (https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/blob/master/docs/PlaybackAPI_WebSocket.md)
  • [x] Channel specific volume settings
  • [ ] Auto Join a music channel
  • [ ] Absolute Vote toggle (Voting system that DJ's can't bypass)
  • [ ] SFX support
  • [ ] [p]prev Can go back multiple songs > This will be easier if #366 is addressed
  • [ ] Play multiple songs at once [p]play 1|2|3 for example
  • [ ] Set maximum allowed volume
  • [ ] Local: M3U/M3U8/PLS/XSPF/WPL/ASX/iTunes Playlists support (#620) (make custom parser or contribute to Lavaplayer/Lavalink)
  • [ ] Parse tracks out of a M3U and PLS url
  • [ ] Repeat the whole queue
  • [ ] [p]play and [p]playlist append commands to bulk enque multiple songs

    Maybe:

  • [ ] A thumbsup/thumbsdown on a np message to make a song play more frequently on a playlist in tandem with the playlist checking on #1544, + skip stats (playlist playing stat saving/management)

  • [ ] More Spotify functionality using their API

    • Search for Artists, Playlists and Albums

    • Use Song Metadata for info

  • [ ] Lyrics support
  • [ ] Expand Spotify playlist support to use SoundCloud API
  • [ ] Jukebox price to be charged per song instead of per command?
  • [ ] Pillow Audio 馃槤
  • [ ] Add a [p]mixplaylist <url> command based on the newly discovered behaviour of youtube mix playlists - https://github.com/Cog-Creators/Red-DiscordBot/issues/2940#issuecomment-583879466
  • [ ] Add RPC functionality; information on doing this at #3741
  • [ ] add [p]makeplaylist that enqueue n number of recently played tracks in the server
  • [ ] add [p]playstric <author> || <track name> which would allow using Global Cache and JDA cache directly.
  • [ ] Add special casing for Live stream playlists

Partialy Done

  • [ ] Configurable maximum queue size - Places where the Queue is Controllate already been added, now need to add a command to set it. (Note to self, Hard coded > Bot Owner > Server Mods)

Done

  • [x] Persist queues on reboot/reload Done in #3242 but want to make it avaliable as part of #3459
  • [x] [p]audioset role To accept a list of roles

What about sfx?

Want to suggest something?

  • Just leave a comment below!
Audio Cog Informational

Most helpful comment

Would be nice perhaps to have a Lavalink log upload command to post the spring.log file, but would only really work on internally run jars. Could help in support when folks are asking for logs. Most users can provide logs and not have much trouble getting them uploaded to hastebin or somewhere else, but this idea would make it even more easy for them. I'm not totally sold on adding this but thought I'd mention it as it may be helpful.

I'm actually sold. We could see if it's external and if external tell them how to find it instead. And if internal we just send the file in a message

All 45 comments

Unless this feature is already proposed somewhere, I would like to propose option to be able to use [p]prev to be able to go more than one song backwards and also to be able to use it with shuffle enabled - similarly to how it is in regular music players.

Currently it will work with Shuffle (with #2904 ), but not more than 1 song, so i'll add that

As we discussed in Discord, a possible feature is allowing server owners/admins to move playlists between servers they own/administrate in.
A possible change to this original idea is that a non admin/owner user in server A can then copy a playlist to server B if they have admin/owner perms where the playlist is being copied to.
These would only apply for guild playlists.

@Vexed01 this would overcomplicate the existing playlist perms quite a bit, privacy is also a concern. and as such am Against this.

However ... Currently you'll be able to copy a playlist from guild A to the User Scope and from the User scope to the Guild scope on Server B.

This allows less cross server information display, and if they really want to copy cross server a 2 step proccess seems okay to me.

That's fine, I wasn't expecting much. It was just an idea!

Hmm, I have another proposition, option to limit the range for volume command? I saw someone that wanted such feature before so that he could enable users to change volume but not let them change it from for example 50% to 150% which would annoy everyone in vc.

Ability to add multiple songs in the play command by separating the songs with a character that's not used often such as "|". Which would be used like [p]play Eminem Lucky You | Joyner ADHD and it adds both songs.

I mostly use redbot for playing local songs and it works pretty well for basic operation of !play "path/music.mp3"
Would it be possible to have commands such as !play "folder" to enqueue all music in that folder.
!local folder is extremely cumbersome since i wouldn't want to transfer all my files to new "localtracks" folder.
For my use case navigation and stuff like that isn't really a concern since i'm always using "copy as path" with windows.

@ltukezl possible it is, however for privacy reason I鈥檓 agaisnt being able to pass a local path to the bot for play, as of 3.3 you are able to create symbolic links so you don鈥檛 need to copy the files into the local tracks folder, the reason the local tracks folder exist is due to the aforementioned privacy concerns.

Fair. symlinks feels decent enought workaround.
Thank you.

The above said it鈥檚 not a hard no, if you can give some examples of use cases where it would prove beneficial to all users and not just yourself, I鈥檓 more than happy to look into the possibilities.

Since it already worked for regular mp files I didn't really concern too much about the possible privacy issues.

While the symlink does function well (EDIT subfolders with music doesn't work, returns nothing found. maybe it's on my end so i'll debug it tomorrow) , it doesn't really scale too well to my 400 albums. So my enchantment suggestions would fall either into the !local folder enchantments such as skip 10 menus and show more albums per menu.
Maybe it could accept the path via DM where the owner might be more likely to post private info or with enought rights the bot could instantly delete messages that has been processed as local path / folder.

Either way I don't really have good solution on hand but I recon queuing whole folders easier would still be beneficial to some portion of users.

Nothing found after you select play or nothing found as in the folder doesn鈥檛 get shown? This is no longer something that shouldn鈥檛 be in this issue please take any further issue to our discord server and we can talk there. I鈥檓 interested to understand exactly what you mean by not found as in when and where it happens

Blocked by #3459

Have a command, most likely usable for server owners, bot owners, bot mod, bot admin that toggles on a bias for lyrics-based song titles via a yt search. This would append "lyrics" to a [p]search query on first glance (could def be implemented differently), and in regards to the idea of the audio track API/caching idea that Draper has, could prioritize cached tracks with lyrics in the song title or similar.

Add a [p]mixplaylist <url> command based on the newly discovered behaviour of youtube mix playlists

MAYBE: add [p]playstric <author> || <track name> which would allow using Global Cache and JDA cache directly.

add [p]makeplaylist that enqueue n number of recently played tracks in the server

Show the enqueued playlist name (and url?) when using genre command.

thingie

I won't be continuing work here, I wont close this issue as its a good way to congragate all feature requests and work. hopefully it assists Aika and anyone else working on Audio in the future.

Add RPC functionality; information on doing this at #3741

Add special casing for Live stream playlists
Note: Users wont be mix livestream with normal songs due to special casing, but this will allow playlist to always have accurate livestream data

[p]audioset role To accept a list of roles?

Adding this here to cleanup original post

Completed:

Somewhere (Deffo in #3459):

  • [x] Show the enqueued playlist name (and url?) when using genre command.
  • [x] Toggles on a bias for lyrics-based song titles via a yt search

    In #2904:

    • [x] Toggle for autopause when no one is in the channel (#721)
    • [x] Autoplay songs when playlist runs out
    • [x] Url or keyword blacklist
    • [x] If a playlist has a playlist url saved (non-custom playlist), check the URL for new songs to import
    • [x] Support timestamps in urls, like https://youtu.be/8CdcCD5V-d8?t=31
    • [x] Child folders within "album" folders in localtracks (#270)
    • [x] Queue doesn't reflect actual order of songs when shuffle is applied because shuffle is random choice out of the queue
    • [x] Global, guild and user scope on saved playlists in
    • [x] Move playlists to a custom Config group and add code to automatically migrate existing playlists to the new structure
    • [x] Playlist txt file (playlist upload/playlist download) rework. Two file options: v2 style (list of urls, only yt and soundcloud urls allowed) and v3 style (Lavalink Track information should be stored and not urls where Lavalink will need to refetch the Track information)
    • [x] Playlist save fix (will overwrite playlists with no confirmation)
    • [x] AudioTrack objects: will hold Lavalink Tracks and localtrack items (no more str handling for local tracks/use Path objects)
    • [x] get_tracks -> load_tracks
    • [x] Split off Spotify functions to its own file in the audio folder, i.e. spotify.py

      In #2950:

    • [x] Play + Bump Combo Command (#2522)

    • [x] Migrate Menus to use Menus from #2809
    • [x] Don't shuffle bumped tracks (Added an extra argument to [p]shuffle that allows the person with permissions to say whether bumped tracks should be shuffled or kept at the top of the queue, off by default)
    • [x] Queue embed to update the bar every x seconds (Added a button to [p]queue that allows the queue to be updated to the current status, will not automate this due to Discords rate limits)
    • [x] Expand local track support to all file formats (Added support for AAC, AU, M3U, M4A, OPUS, RA, TS, WAV, WMA, 3GP, FLV M4V, MKV, MP4, MOV, WEBM, WMV)

In #3085:

  • [x] Expose FriendlyExceptions for tracks to the users
  • [x] Replay queue history by day (#366, Done in #3199)

    in Other:

  • [x] Expose FriendlyException on play command (#3085)

  • [x] Allow Removing tracks from queue by URL (#3201)
  • [x] Stop the player after multiple subsequential errors (#3165)

    Fixed:

In #2904:

  • [x] [p]audioset settings reports Jar build incorrectly (#2880)

    In #2950:

In Other:

  • [x] Audio Bug after disconnect (#2711) in https://github.com/Cog-Creators/Red-Lavalink/pull/61
  • [x] Fix an issue with mixplaylist being recognised as single tracks (#3104)
  • [x] Restart Lavalink after unexpected shutdown (#3034)
  • [x] An error throw in the event handler (#3168)
  • [x] Fix a console spam (#3123)
  • [x] Fixed a potential crash on commands (#3122)

As per conversation in #support could a __global empty disconnect__ feature be added to the bot's owner's perms?
That way, if 100 servers have the bot playing music to an empty VC or the bot not playing anything, it wouldn't use the excess hosting resources?

I'd like to seem some global audio settings for emptydisconnect and emptypause.

Personally, I don't like leaving things open if they aren't being used, and secondly because some users do feel uncomfortable about it.

I think an additional benefit would be a toggle for the bot owner to enforce these settings, so server owners/staff can't change them.

@Drapersniper (I think this was you) response on discord:

Put it there
But realistically the way I'd implement is a global default that guilds can opt out of if they should choose
Rather than a global rule

My response:

That's why I suggested that as a separate toggle. A bot owner might have limited bandwith and choose to allow the option to use audio, but enforce the global rules to save the bandwidth.
It allows for it to be set up for the circumstances required.

Implement the "something when wrong ..." kinda message mentioned in #3868

image

Draper told me we need something like this:
image

Draper told me we need something like this:
image

AAAAAAAAAAAAAAAAAAAAAAA

On java requirement failure message, link to docs for instructions on how to get supported java

I've been told to blame @jack1142 on this.

firefox_tG7gEGCk8K
firefox_Z0BhXQ6oUy

Remove % in [p]volume help menu. Having it just say "Set the volume 1-150" seems more user-friendly and intuitive

The way how volume will work is going to significantly change. In a future update if everything goes to plan, but I'll keep that in mind.

The problem with saying just 1-150 is that is an number without any context , that's the diff between between 100 and 110 in, eith percentage we know that that's a 10% increase and not a .. exponential increase where the value doubles every n stead

Note: could just edit the usage arg rather than the docstrings

Would be nice perhaps to have a Lavalink log upload command to post the spring.log file, but would only really work on internally run jars. Could help in support when folks are asking for logs. Most users can provide logs and not have much trouble getting them uploaded to hastebin or somewhere else, but this idea would make it even more easy for them. I'm not totally sold on adding this but thought I'd mention it as it may be helpful.

Would be nice perhaps to have a Lavalink log upload command to post the spring.log file, but would only really work on internally run jars. Could help in support when folks are asking for logs. Most users can provide logs and not have much trouble getting them uploaded to hastebin or somewhere else, but this idea would make it even more easy for them. I'm not totally sold on adding this but thought I'd mention it as it may be helpful.

I'm actually sold. We could see if it's external and if external tell them how to find it instead. And if internal we just send the file in a message

Allow chaining on playlist start, like [p]playlist start playlist1 playlist2 playlist3

It would be really cool to implement this. For more care about resources usage.
image

Add support for YouTube music api, non async ref can be found at https://github.com/sigma67/ytmusicapi/tree/master/ytmusicapi

Add a playlist search command to be able to search for tracks on a saved Red playlist, the output would return artist/title/link like many of the other song displays (queue, playlist info, etc)

Would we want to also add enqueue functionality allowing you to play the search result ?

Possibly, my use case was trying to search a saved playlist for specific artists so that I could remove them with playlist remove commands.

some default audio eq presets would be cool(i am aware of how to save eq configs). idk how to justify the need but somewhere on the lines of red having default songs maybe. Would be useful to show off how eq is cool.

some default audio eq presets would be cool(i am aware of how to save eq configs). idk how to justify the need but somewhere on the lines of red having default songs maybe. Would be useful to show off how eq is cool.

Yeah planning to do this on the rewrite and give users a handful of premade presets such as base boos, piano, voice etc

Make Query option 5 (JDA) optional on GlobalAPI and implement on audio (Draper on disc)

Was this page helpful?
0 / 5 - 0 ratings