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

Use WEB client, add 403 retry (Fix "Video returned by Youtube is not what was requested") #88

Closed
wants to merge 2 commits into from

Conversation

devoxin
Copy link
Member

@devoxin devoxin commented Mar 30, 2024

Should fix lavalink-devs/Lavalink#1030 by switching from ANDROID client to WEB.

To minimize the chances of encountering a 403 due to the odd invalid cipher resolving, I've implemented a basic 403 retry mechanism that will aim to fetch a new stream URL up to 3 times before throwing.

@devoxin devoxin mentioned this pull request Mar 30, 2024
@duncte123
Copy link
Contributor

Maybe playlists will work with the new player params from #93 ?

@devoxin devoxin changed the title Use WEB client and add 403 retry mechanism Use WEB client, add 403 retry (Fix "Video returned by Youtube is not what was requested") Apr 4, 2024
t3rminus added a commit to t3rminus/MusicBot that referenced this pull request Apr 8, 2024
@jocull
Copy link

jocull commented Apr 8, 2024

Can someone explain? I don't understand how this supersedes #93 because I don't see any file overlap 😕 What am I missing? Is the whole client being changed away from Android and that is why version is irrelevant now?

@devoxin
Copy link
Member Author

devoxin commented Apr 8, 2024

What is there to explain? ANDROID breaks every other week so we changed the client back to WEB (what it originally was many moons ago) which appears to be more reliable, as evidenced by the fact many users have been running this PR in various forms over the last week or so.

Copy link

@Vulcano771 Vulcano771 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im not sure, but

// Android client gives encoded Base64 response to trailer which is also protobuf so we can't decode it
clientConfig = YoutubeClientConfig.WEB.copy();

Since you now use WEB we have no longer Android - or do I understand that wrong?

@devoxin
Copy link
Member Author

devoxin commented Apr 10, 2024

I don't understand what you're asking.

This change will likely be superseded by my rewritten source manager once I make a release for it anyway. The entire lot has been refactored and restructured so this doesn't matter. It was just a dirty fix so we could at least release a working jar.

@devoxin
Copy link
Member Author

devoxin commented Apr 22, 2024

Superseded by https://github.com/lavalink-devs/youtube-source

Users are advised to move to that as it's likely that the built-in source manager will be deprecated soon.
Leaving this PR open until plans have been finalized in the form of a release to bring awareness to this change.

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.

Video returned by YouTube isn't what was requested
5 participants