Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bug with youtube track details parsing #687

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

idpromnut
Copy link

This must have been changed very recently as the JSON format returned by Youtube has changed slightly in structure. Added code to optionally pull "player" and "playerResponse" elements from the results map at the top level first rather than as child values.

…sults map at the top level first rather than as child values.
@idpromnut
Copy link
Author

Addresses Issue #688

@Janisbtw
Copy link

Janisbtw commented Apr 6, 2022

Hey, I know this might sound stupid, but i can't manage to compile this using the gradlew.bat due to a compilation error.
lavaplayer\stream-merger\src\main\java\com\sedmelluq\lava\player\extras\stream\StreamAudioPlayer.java:291: error: constructor TrackStuckEvent in class TrackStuckEvent cannot be applied to given types; dispatchEvent(new TrackStuckEvent(StreamAudioPlayer.this, track, thresholdMs));
Can you help me with building this?

@idpromnut
Copy link
Author

idpromnut commented Apr 6, 2022

@Janisbtw Yeah, I couldn't get it to compile without modifying the constructor, and that was the state the code was in when I cloned the repo. I just ignored it as it doesn't seem to affect anything I was using (primarily Youtube). I can look further into a fix for it, but I'd really like this fix to get pulled in first as it fixes completely broken Youtube functionality.

Note that the main library will still compile and package correctly even with that library not compiling.

@Janisbtw
Copy link

Janisbtw commented Apr 6, 2022

After fixing the constructor and the references in the other files I get this error
`Execution failed for task ':extensions:format-xm:compileJava'.

Could not resolve all files for configuration ':extensions:format-xm:compileClasspath'.
Could not resolve com.github.micromod:ibxm:a73.
Required by:
project :extensions:format-xm
> Could not resolve com.github.micromod:ibxm:a73.
> Could not get resource 'https://dl.bintray.com/gabixdev/kyoko/com/github/micromod/ibxm/a73/ibxm-a73.pom'.
> Could not GET 'https://dl.bintray.com/gabixdev/kyoko/com/github/micromod/ibxm/a73/ibxm-a73.pom'.
> The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/6.8.2/userguide/build_environment.html#gradle_system_properties
> Remote host terminated the handshake`

Do you mind uploading the build to a file hosting service?

@idpromnut
Copy link
Author

I couldn't get the ibxm library compiling either. I was really focused only on the core library.

@jaguaar
Copy link

jaguaar commented Apr 6, 2022

I couldn't get the ibxm library compiling either. I was really focused only on the core library.

Same, just fixed and builded the core to get it running. But i checked the ibxm lib and it looks like it's hosted on a private server or something?

@alula
Copy link

alula commented Apr 6, 2022

Bintray has been closed ages ago. There's PR #676 which fixes mod player build breakage.

thedarkcolour added a commit to thedarkcolour/lavaplayer that referenced this pull request Apr 7, 2022
@BlastyTheDev
Copy link

How do I use this to fix the issue? (dont know how to use pull requests)
I'm using maven to add lavaplayer as a dependency btw

@MCOfficer
Copy link
Contributor

How do I use this to fix the issue? (dont know how to use pull requests) I'm using maven to add lavaplayer as a dependency btw

Use jitpack with the PR author's fork and branch: https://jitpack.io/#idpromnut/lavaplayer/youtube_details_parse_bug-SNAPSHOT

Or Walkyst's fork, which isn't abandoned: https://github.com/Walkyst/lavaplayer-fork

@confusedkernel
Copy link

Hello, how do I use this to fix the problem? I have added this as a dependency like

        <dependency>
            <groupId>com.github.idpromnut</groupId>
            <artifactId>lavaplayer</artifactId>
            <version>1.3.78</version>
        </dependency>

but the problem still pops up...

@MCOfficer
Copy link
Contributor

MCOfficer commented Apr 7, 2022

You need their branch as version, not 1.3.78. In this case youtube_details_parse_bug-SNAPSHOT. Jitpack lets you copypaste that on the link i sent.

@God0nlyKnows
Copy link

It works for single video, but still throws null when parsing playlist.

@idpromnut
Copy link
Author

It works for single video, but still throws null when parsing playlist.

Ah, I don't use the playlist functionality, so did not test it. @God0nlyKnows can you grab a network capture of the JSON that is returned when playing a playlist and I can see if I can see what the issue is?

@God0nlyKnows
Copy link

God0nlyKnows commented Apr 8, 2022

Ah, I don't use the playlist functionality, so did not test it. @God0nlyKnows can you grab a network capture of the JSON that is returned when playing a playlist and I can see if I can see what the issue is?

Hmm.. I've tested it now and it's working fine, probably they changed it again

Anyway thanks for bugfix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.