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

For android client send sdk version to youtube #3255

Merged
merged 1 commit into from
Aug 7, 2022

Conversation

unixfox
Copy link
Member

@unixfox unixfox commented Aug 7, 2022

In this PR, when using the ANDROID client, we send the androidSdkVersion alongside, in order to tell Youtube servers that we are using a recent Android version. The number 29 equals to the android API level, which is Android 10.

I've included the 29 Android API level instead of 30 because the clientVersion that we are using right now include 29 as it seems like the sdk version.

This fixes the error Content not available in this app. upgrade to latest version of youtube..

The new parameter was found in TeamNewPipe/NewPipe#8713 (comment)

Fixes #3230

@unixfox unixfox requested a review from a team as a code owner August 7, 2022 17:28
@unixfox unixfox requested review from SamantazFox and removed request for a team August 7, 2022 17:28
@unixfox unixfox force-pushed the fix-content-not-available branch 2 times, most recently from fadcada to ce95d52 Compare August 7, 2022 17:33
@Lesmiscore
Copy link
Contributor

I've included the 29 Android API level instead of 30 because the clientVersion that we are using right now include 29 as it seems like the sdk version.

App versions and Android's SDK versions are completely different and always independent. App version does increment on app updates and SDK version does on system updates. In theory you can set 30 (Android 11) without problem.

@unixfox unixfox force-pushed the fix-content-not-available branch from ce95d52 to 444f614 Compare August 7, 2022 19:26
src/invidious/yt_backend/youtube_api.cr Outdated Show resolved Hide resolved
src/invidious/yt_backend/youtube_api.cr Outdated Show resolved Hide resolved
@unixfox unixfox force-pushed the fix-content-not-available branch 2 times, most recently from 0369d7c to 92a4aef Compare August 7, 2022 19:36
@unixfox unixfox force-pushed the fix-content-not-available branch from 92a4aef to 218f7be Compare August 7, 2022 19:37
@SamantazFox SamantazFox merged commit 390734d into master Aug 7, 2022
@SamantazFox SamantazFox deleted the fix-content-not-available branch August 7, 2022 19:43
@accessiblepixel
Copy link

I've not seen this error from #3230 since, except today where I tried to watch a video and it came up, so it looks like in certain circumstances it's still possible? Was the debug thing not added, where if the video that comes back isn't the video id requested to throw some kind of exception?

@unixfox
Copy link
Member Author

unixfox commented Aug 23, 2022

Please continue the discussion in #3230 instead.

@iv-org iv-org locked as off-topic and limited conversation to collaborators Aug 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Content not available in this app. upgrade to latest version of youtube.
4 participants