-
Notifications
You must be signed in to change notification settings - Fork 54
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 mp3 frame not found. #196
Conversation
The error was caused by selecting the first track without checking the codec
ah that makes sense, lavaplayer can also play aac tracks fyi |
.filter(c -> c.get("codec").text().equals("mp3")) | ||
.max(Comparator.comparingInt(b -> b.get("bitrateInKbps").as(Integer.class))) | ||
.map(d -> d.get("downloadInfoUrl").text()) | ||
.orElse(null); |
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.
you can use orElseThrow
here
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.
I'll do a comit when I get home, didn't know about orElseThrow. :>
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.
you can use
orElseThrow
here
Do I fix it or don't I need to fix it?
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.
ideally you do
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.
Np
main/src/main/java/com/github/topi314/lavasrc/yandexmusic/YandexMusicAudioTrack.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Toπ <git@topi.wtf>
feel free to add support for this if you want, else this is ready to merge |
Doesn't make sense as yandex always gives mp3. |
thanks |
The error was caused by selecting the first track without checking the codec.