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

Fix "Unknown Error" on Playback Request Due to InnerTube API Changes #468

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

SageTendo
Copy link

@SageTendo SageTendo commented Jan 27, 2025

Should: fix #433, fix #438, fix #445, fix #463, fix #467

Summary:

Due to recent InnerTube changes, playback data and valid streams cannot be returned to the client, resulting in 403 responses or invalid playability status in the PlayerResponse. A similar solution is used in OuterTune and Metrolist to handle these issues. Credits: @gechoto.

Note: Direct streams seem to cause issues once in a while, such as playback interrupts or timeouts. This might be due to the current version of NewPipeExtractor (0.24.4) failing to deobfuscate Throttling Params. Commit 1ca8275 resolves this, so maybe that could be used in the meantime until the next version release?

- Replaced Piped Streams with direct YouTube streams for `YouTube.player()`, as [pipedapi.kevin.rocks](https://pipedapi.kevin.rocks) is down.
  **Note**: Direct streams seem to cause issues once in a while, such as playback interrupts or timeouts.
- Added support for signature timestamps in `YouTube.player()`, fetched from InnerTube using the media ID, for clients requiring signature timestamps.
- Playback and stream fetching handled in `innertune/utils/YTPlayerUtils.kt`.
- Extraction/Deobfuscation of `PlayerResponse` data is handled in `innertube/utils/NewPipeUtils.kt`.
- Updated 'YoutubeClient' clients to reflect changes.
- Fixed Kugou test causing build errors

### Additional Changes:
- Added [libs.newpipeExtractor](https://github.com/TeamNewPipe/NewPipeExtractor) to `libs.versions.toml` and `innertube/build.gradle`.
@SageTendo SageTendo marked this pull request as ready for review January 27, 2025 18:58
…layer requests (doesn't appear to be used anymore)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant