topi314 / SponsorBlock-Plugin

Lavalink SponsorBlock Plugin
Apache License 2.0
21 stars 2 forks source link

Error for some non YouTube sources #2

Closed zRickz closed 1 year ago

zRickz commented 1 year ago

Hello! I'm trying to use the library but it has some errors, I would like to know if it continues to work normally...

topi314 commented 1 year ago

Idk depends on the errors? I can't tell much without more info

zRickz commented 1 year ago

When unable to pull the requested segments presents a JSONArray formatting error and stops the song But I'm using Lavasrc and a non-Java library, I believe it's trying to pull the segments from other platforms outside of YouTube and it returns this error, I'll investigate the situation further and get in touch if I have errors with YouTube tracks. Thanks for the help anyway and sorry for the inconvenience.

Here's a note for someone who has the same problem and is using LavaSrc outside of Java xD

topi314 commented 1 year ago

It should only try for yt videos but I can imagine my code for track decoding is failing https://github.com/TopiSenpai/Sponsorblock-Plugin/blob/master/src/main/java/com/github/topisenpai/plugin/sponsorblock/SponsorBlockPlugin.java#L49

topi314 commented 1 year ago

It would be helpful if you just send the stacktraces

zRickz commented 1 year ago

I think it was just my mistake, but I think it would be a good idea to analyze if the sourceName is from YouTube, if not, it cancels the action and doesn't make the request to the SponsorBlcok API(if possible).

topi314 commented 1 year ago

It already does that But for tracks with custom encoded data this can break

zRickz commented 1 year ago

Interesting... So, i think it's really only giving errors and stop on non-YouTube tracks(Like Souncloud and Deezer).

topi314 commented 1 year ago

SoundCloud should work fine as it had no extra data

Deezer on the other hand has 2 extra fields which may do funny stuff I can fix that tomorrow probably

zRickz commented 1 year ago

Nice! I wait, good luck bro.

topi314 commented 1 year ago

alright can you test again with bf41a69 as version?

zRickz commented 1 year ago

Tested and approved, now is working fine and without errors! Thanks bro <3

topi314 commented 1 year ago

fixed in https://github.com/TopiSenpai/Sponsorblock-Plugin/releases/tag/1.0.4