busty icon indicating copy to clipboard operation
busty copied to clipboard

Allow submitting a song by posting a cdn.discordapp.com link in a message

Open anoadragon453 opened this issue 2 years ago • 2 comments

Which would allow developers to test >8MB songs without needing to pay for Discord nitro.

As any old file could be behind a cdn.discordapp.com link, checking for known audio/video file extensions in the link before downloading the file would be necessary.

anoadragon453 avatar Mar 01 '22 23:03 anoadragon453

A few things

  1. I have Discord nitro now, though I guess this doesn't help you much
  2. How do you propose the following single message be treated? (# of submissions and how "More info" would look)?
song1
https://cdn.discordapp.com/attachments/905743447892312104/948653049818263602/kaya_-_stateless.mp3
song2
https://cdn.discordapp.com/attachments/905743447892312104/948653073562226809/kaya_-_kid.mp3

Should all URLs be removed from "More info"? Should only the first URL count? etc

  1. We could consider allowing arbitrary URLs with appropriate extensions as well (from Dropbox, etc), though this leads to the possibility of massive files above any Discord size limit or extremely slow connections which could hold Busty up for a long time, both of which we'd probably need to write contingencies for.

Cephian avatar Mar 02 '22 18:03 Cephian

I'd suggest only supporting Discord attachments, as arbitrary URLs may easily pick up false positives.

It may be a bit overengineered, but we could strip cdn.discordapp.com URLs from messages and convert them into an nextcord.message.Attachment object, to then process further.

I would probably support only reading the first audio-like attachment. Otherwise you'll have multiple songs with the same More Info text.

anoadragon453 avatar Mar 19 '22 08:03 anoadragon453