Closed ShyPianoGuy closed 6 years ago
Never tried this. Presumably, you would have to send the file path as the identifier. Bear in mind that the file is local to the lavalink server receiving the request.
oh so something like ?identifier=/path/to/file?
I'd assume so
i tried, got nothing :(
You need to URL encode the parameter.
/path/to/file
becomes %2Fpath%2Fto%2Ffile
Also don't forget to enable the local audio source manager in application.yml
still didn't seem to work. My application has local: true and i did the URL encoded way and tried multiple paths and still didn't seem to work
You need to use it like this:
.play file://Music/RickRolledMe.mp3
Music would be the folder you added in the same folder where the fredboat.jar file is.
However there is a little bug. You can't have any spaces in your path or it won't work.
I'm so dump. Tottaly unrelated to the issue. Please ignore this.
The audio file is on the server, right?
yes @Frederikam
I'm not sure the file has to be in the same folder, I've had MP3 tracks in my music folder on Windows (no spaces, though), identifier isn't URL encoded (using lavalink.py V2) and it works
Also to clarify, paths containing spaces are also working for me.
Thats werid, didnt work for me
What lavalink wrapper are you using?
Discord.js-lavalink (My own) but wrapper doesn't matter, its what you use to resolve the track, lol
Can also confirm it works for me and it doesn't have to be in the Lavalink folder.
Discord.js-lavalink (My own) but wrapper doesn't matter, its what you use to resolve the track, lol
If your wrapper doesn't percent encode the string it should fail. Eg you need %20
instead of a space.
@Frederikam The users of my wrapper are to handle resolving of the tracks themselves... it doesnt do anything on the rest side...
To sum up the given answers:
/loadtracks
If this does not resolve the issue, please post logs of the server and/or show what happens when you curl
the /loadtracks
endpoint.
how would i go on about playing a local file?