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

Add yt-dlp fallback for stream extraction #1768

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from
Draft

Conversation

gechoto
Copy link
Contributor

@gechoto gechoto commented Dec 21, 2024

This should fix the current playback issues: #1748

This is not a perfect solution:

  • it increases the apk size by a lot (includes python)
  • it is slow
  • is increases data usage (downloads the player js again and again for every stream)

But in my testing so far it works.
If you have a better idea feel free to share.

I tried to counter the slowness by only using this as a fallback for now.
In the long term it might be more reliable to offload more to yt-dlp.

I know the code is not the best. We can improve on that later.
However it should be fine for now as a quick fix.

Needs more testing.

TODO - before release:
- disable sending login info when using IOS client (it does not support login anymore but results in an error) DONE

TODO - for later:

  • maybe build split apks to decrease apk size
  • see if there is a way to cache the player js to decrease data usage
  • maybe update yt-dlp less often (daily + manual?) (currently every app start)
  • check if the secure flag in the cookies file can be enabled
  • maybe rename and optimize some stuff
  • check if api_key can be removed from clients (it doesn't seem to be used anyone in recent clients?)
  • check if TVHTML5 client can be removed

Note: This also contains a temporary change to set the cookie value to null if the user is logged out (because only null is considered logged-out). It can be removed after #1694 is done.

Copy link

gitguardian bot commented Dec 21, 2024

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard.
Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
14305798 Triggered Google API Key 35653ef innertube/src/main/java/com/zionhuang/innertube/models/YouTubeClient.kt View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@gechoto gechoto marked this pull request as draft December 23, 2024 01:41
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.

1 participant