-
Notifications
You must be signed in to change notification settings - Fork 49
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
Fix NicoNico Track #50
Conversation
I have many points to raise about this PR.
|
Thank you so much for the fast response and feedback, so sorry about the issues with the code. I'm self-taught and first made the changes while modifying a music bot so I'm not too familiar with standard practice. I'll rewrite to to align with the feedback. An account is not necessary to stream most tracks, and I haven't found a track that needs an account to access it. However, the niconico.py library still has a login feature, so I left it in as a precaution in case there's some scenario where it's needed. |
There is no need to close this, you can simply push additional commits to this pr |
I've tried to implement the changes as advised, still unsure about |
additional note: It resolves Walkyst/lavaplayer-fork#85 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please reformat your codestyle to match the rest of the codebase
main/src/main/java/com/sedmelluq/discord/lavaplayer/source/nico/NicoAudioTrack.java
Outdated
Show resolved
Hide resolved
main/src/main/java/com/sedmelluq/discord/lavaplayer/source/nico/NicoAudioTrack.java
Outdated
Show resolved
Hide resolved
main/src/main/java/com/sedmelluq/discord/lavaplayer/source/nico/NicoAudioTrack.java
Outdated
Show resolved
Hide resolved
main/src/main/java/com/sedmelluq/discord/lavaplayer/source/nico/NicoAudioTrack.java
Outdated
Show resolved
Hide resolved
main/src/main/java/com/sedmelluq/discord/lavaplayer/source/nico/NicoAudioTrack.java
Outdated
Show resolved
Hide resolved
main/src/main/java/com/sedmelluq/discord/lavaplayer/source/nico/NicoAudioTrack.java
Outdated
Show resolved
Hide resolved
main/src/main/java/com/sedmelluq/discord/lavaplayer/source/nico/NicoAudioTrack.java
Outdated
Show resolved
Hide resolved
main/src/main/java/com/sedmelluq/discord/lavaplayer/source/nico/NicoAudioTrack.java
Outdated
Show resolved
Hide resolved
main/src/main/java/com/sedmelluq/discord/lavaplayer/source/nico/NicoAudioTrack.java
Outdated
Show resolved
Hide resolved
main/src/main/java/com/sedmelluq/discord/lavaplayer/source/nico/NicoAudioTrack.java
Outdated
Show resolved
Hide resolved
You're on the right track with it but still looks extremely bulky. Is every field there really necessary for playback? |
Seems like almost every field is necessary, I've tried to remove each of them in testing but only content_uri and priority can be omitted without the request 400'ing. I'll also join the discord, might be more convenient to discuss changes I should make there. |
Moving discussion to https://discord.com/channels/1082302532421943407/1183572413213053038 |
…seconds, removed redundant JSON elements when possible, and changed .select().first() to .selectFirst()
main/src/main/java/com/sedmelluq/discord/lavaplayer/source/nico/NicoAudioSourceManager.java
Show resolved
Hide resolved
main/src/main/java/com/sedmelluq/discord/lavaplayer/source/nico/NicoAudioTrack.java
Show resolved
Hide resolved
main/src/main/java/com/sedmelluq/discord/lavaplayer/source/AudioSourceManagers.java
Show resolved
Hide resolved
main/src/main/java/com/sedmelluq/discord/lavaplayer/source/nico/NicoAudioSourceManager.java
Show resolved
Hide resolved
main/src/main/java/com/sedmelluq/discord/lavaplayer/source/nico/NicoAudioSourceManager.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you also make getWatchUrl
return a https link?
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should prob be fine now
NicoNico removed their getflv API sometime this march. I implemented this blog post's solution and referenced this library's JSON repackaging.