Error when trying to play
Tried downloading many different mp3 files, other players tried too, all we get is "An error has occurred while trying to play this disc." Console log:
[17:35:03] [AudioPlayerThread/WARN]: javax.sound.sampled.UnsupportedAudioFileException: not a MPEG stream:Cannot invoke "javazoom.jl.decoder.Header.version()" because "m_header" is null
[17:35:03] [AudioPlayerThread/WARN]: at custom-discs-3.0.jar//javazoom.spi.mpeg.sampled.file.MpegAudioFileReader.getAudioFileFormat(MpegAudioFileReader.java:449)
[17:35:03] [AudioPlayerThread/WARN]: at custom-discs-3.0.jar//org.tritonus.share.sampled.file.TAudioFileReader.getAudioInputStream(TAudioFileReader.java:387)
[17:35:03] [AudioPlayerThread/WARN]: at custom-discs-3.0.jar//org.tritonus.share.sampled.file.TAudioFileReader.getAudioInputStream(TAudioFileReader.java:329)
[17:35:03] [AudioPlayerThread/WARN]: at custom-discs-3.0.jar//javazoom.spi.mpeg.sampled.file.MpegAudioFileReader.getAudioInputStream(MpegAudioFileReader.java:583)
[17:35:03] [AudioPlayerThread/WARN]: at custom-discs-3.0.jar//javazoom.spi.mpeg.sampled.file.MpegAudioFileReader.getAudioInputStream(MpegAudioFileReader.java:493)
[17:35:03] [AudioPlayerThread/WARN]: at custom-discs-3.0.jar//me.Navoei.customdiscsplugin.PlayerManager.convertFormat(PlayerManager.java:134)
[17:35:03] [AudioPlayerThread/WARN]: at custom-discs-3.0.jar//me.Navoei.customdiscsplugin.PlayerManager.readSoundFile(PlayerManager.java:123)
[17:35:03] [AudioPlayerThread/WARN]: at custom-discs-3.0.jar//me.Navoei.customdiscsplugin.PlayerManager.playChannel(PlayerManager.java:107)
[17:35:03] [AudioPlayerThread/WARN]: at custom-discs-3.0.jar//me.Navoei.customdiscsplugin.PlayerManager.lambda$playLocationalAudio$4(PlayerManager.java:73)
[17:35:03] [AudioPlayerThread/WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[17:35:03] [AudioPlayerThread/WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[17:35:03] [AudioPlayerThread/WARN]: at java.base/java.lang.Thread.run(Thread.java:1583)
Paper 1.21.1 server
What command did you use ?
Just this partial error log isn't enought to say what's going on here.
From the error, my best guess is that you use a bad URL (not a sound file) but more like an audio streaming service and for sure, this will not work (javax.sound.sampled.UnsupportedAudioFileException: not a MPEG stream).
Used filebin for the music
Ok, never used this service, but I think this will not be "fixable".
Each file you download from this server will weight 5.29KB (5 427B). The reason is simple, just look inside the file :
<small><em>This warning will be shown only once.</em></small>
</div>
<div class="row p-3 mt-4 gx-5">
<div class="col-md-1">
</div>
<div class="col-md-5">
<p><b>Filebin is</b> a file sharing service built to make it easy to share files with other people on the Internet or between your own devices.</p>
<p><b>Malicious actors can abuse Filebin</b> to spread files containing malware and other illegal content.</p>
</div>
<div class="col-md-5">
<p><b>You are one click away</b> from downloading content that was shared via Filebin. This content may be dangerous.</p>
<p><b>You must decide</b> if you want to proceed to download the content or not. If you did not expect to end up here, it may be a good idea to not proceed.</p>
</div>
<div class="col-md-1">
In short : You download a web page, not the audio file, due to some kind of warning.
You can see this page when you first try to open the direct link :
Issue there, the plugin didn't handle cookies, and so, even doing a "double download" will end up on this page and never go through.
I don't see a way to avoid this behavior.
Edit : There could be a solution, but it'll need a "big" code change to handle a way to send headers first.
I see, the Fabric version Audioplayer uses filebin for the music, switched to Paper recently so naturally we tried using filebin. I'll try using some other site, thank you.
Yeah, that's two differents plugins (even more, for fabric, more like a "mod" :D )
Thinking of it, there should be a way to implement a different download behavior when a "filebin" url is used (if filebin, use this download function, else use the generic one).
Shouldn't be too hard to do that, but as my fork is slighty different, I'll not be able to make a push request for such change :D
what website do i need to use?
what website do i need to use?
My server uses https://catbox.moe/, very simple