sub-kek / CustomDiscs-SVC

9 stars 0 forks source link

403 and proxy support or caching #3

Closed Trard closed 3 months ago

Trard commented 3 months ago

Youtube blocks ip (for over a week) if you make too many requests

So, it would be nice if you added a proxy support or caching if a disc made with createyt

Logs:

[19:56:59] [Region Scheduler Thread #0/INFO]: Trard issued server command: /cd createyt https://www.youtube.com/watch?v=faAYOXlh2G0 "test"
[19:57:00] [lava-daemon-pool-playback-1-thread-1/ERROR]: [io.github.subkek.customdiscs.libs.com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor] Error in playback of faAYOXlh2G0
io.github.subkek.customdiscs.libs.com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Something broke when playing the track.
        at io.github.subkek.customdiscs.libs.com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:45) ~[CustomDiscs-1.3.9(2).jar:?]
        at io.github.subkek.customdiscs.libs.com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:113) ~[CustomDiscs-1.3.9(2).jar:?]
        at io.github.subkek.customdiscs.libs.com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$executeTrack$1(DefaultAudioPlayerManager.java:324) ~[CustomDiscs-1.3.9(2).jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) ~[?:?]
        Suppressed: io.github.subkek.customdiscs.libs.com.sedmelluq.discord.lavaplayer.tools.exception.EnvironmentInformation:
  lavaplayer.version: 0eaeee195f0315b2617587aa3537fa202df07ddc-SNAPSHOT
  os.arch: amd64
  os.name: Linux
  os.version: 6.1.0-22-amd64
  java.vendor: Amazon.com Inc.
  java.version: 21.0.3
  java.runtime.version: 21.0.3+9-LTS
  java.vm.version: 21.0.3+9-LTS
Caused by: java.lang.RuntimeException: Not success status code: 403
        at io.github.subkek.customdiscs.libs.com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.validateStatusCode(PersistentHttpStream.java:88) ~[CustomDiscs-1.3.9(2).jar:?]
        at io.github.subkek.customdiscs.libs.com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.attemptConnect(PersistentHttpStream.java:124) ~[CustomDiscs-1.3.9(2).jar:?]
        at io.github.subkek.customdiscs.libs.com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.connect(PersistentHttpStream.java:106) ~[CustomDiscs-1.3.9(2).jar:?]
        at io.github.subkek.customdiscs.libs.com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.internalRead(PersistentHttpStream.java:158) ~[CustomDiscs-1.3.9(2).jar:?]
        at io.github.subkek.customdiscs.libs.com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.read(PersistentHttpStream.java:174) ~[CustomDiscs-1.3.9(2).jar:?]
        at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:295) ~[?:?]
        at java.io.DataInputStream.readByte(DataInputStream.java:275) ~[?:?]
        at io.github.subkek.customdiscs.libs.com.sedmelluq.discord.lavaplayer.container.matroska.format.MatroskaEbmlReader.readEbmlInteger(MatroskaEbmlReader.java:39) ~[CustomDiscs-1.3.9(2).jar:?]
        at io.github.subkek.customdiscs.libs.com.sedmelluq.discord.lavaplayer.container.matroska.format.MatroskaFileReader.readNextElement(MatroskaFileReader.java:46) ~[CustomDiscs-1.3.9(2).jar:?]
        at io.github.subkek.customdiscs.libs.com.sedmelluq.discord.lavaplayer.container.matroska.MatroskaStreamingFile.readFile(MatroskaStreamingFile.java:74) ~[CustomDiscs-1.3.9(2).jar:?]
        at io.github.subkek.customdiscs.libs.com.sedmelluq.discord.lavaplayer.container.matroska.MatroskaAudioTrack.loadMatroskaFile(MatroskaAudioTrack.java:52) ~[CustomDiscs-1.3.9(2).jar:?]
        at io.github.subkek.customdiscs.libs.com.sedmelluq.discord.lavaplayer.container.matroska.MatroskaAudioTrack.process(MatroskaAudioTrack.java:35) ~[CustomDiscs-1.3.9(2).jar:?]
        at io.github.subkek.customdiscs.libs.com.sedmelluq.discord.lavaplayer.track.DelegatedAudioTrack.processDelegate(DelegatedAudioTrack.java:25) ~[CustomDiscs-1.3.9(2).jar:?]
        at io.github.subkek.customdiscs.libs.com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack.processStatic(YoutubeAudioTrack.java:83) ~[CustomDiscs-1.3.9(2).jar:?]
        at io.github.subkek.customdiscs.libs.com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack.processStaticWithRetry(YoutubeAudioTrack.java:65) ~[CustomDiscs-1.3.9(2).jar:?]
        at io.github.subkek.customdiscs.libs.com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack.process(YoutubeAudioTrack.java:52) ~[CustomDiscs-1.3.9(2).jar:?]
        at io.github.subkek.customdiscs.libs.com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:101) ~[CustomDiscs-1.3.9(2).jar:?]
        ... 4 more