Skip to content

YtAPI: Bump client versions #5325

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

YtAPI: Bump client versions #5325

wants to merge 4 commits into from

Conversation

Fijxu
Copy link
Member

@Fijxu Fijxu commented May 22, 2025

Updates the versions of some clients and fixes #5324

What has been tested:

  • Channels: videos, shorts, podcasts, playlists and posts (community) are displayed
  • Youtube playlists
  • Tokens along with inv_sig_helper, videoplayback works fine on DASH and Medium
  • Trending videos

Everything seems to work fine on my end so I doubt this is going to break something.

Versions were taken from https://github.com/LuanRT/YouTube.js/blob/0f1fd7223c2e5c8e28637e84a1c00c6d88fad50f/src/utils/Constants.ts#L59

@Fijxu Fijxu requested a review from a team as a code owner May 22, 2025 20:13
@Fijxu Fijxu requested review from SamantazFox and removed request for a team May 22, 2025 20:13
Copy link
Member

@syeopite syeopite left a comment

Choose a reason for hiding this comment

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

The IOS client versions should probably also be updated

@Fijxu
Copy link
Member Author

Fijxu commented May 22, 2025

That should be ok, Invidious uses a more updated IOS version than the one being used on youtube.js, should work fine tho, but I haven't tested it since Invidious doesn't use the IOS client at all.

https://github.com/LuanRT/YouTube.js/blame/0f1fd7223c2e5c8e28637e84a1c00c6d88fad50f/src/utils/Constants.ts#L32

Copy link
Member

@syeopite syeopite left a comment

Choose a reason for hiding this comment

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

Looks good to me. I'd like to wait for a review from @SamantazFox first before merging in case there's some nuances I missed.

Comment on lines 21 to 22
private IOS_USER_AGENT = "com.google.ios.youtube/#{IOS_APP_VERSION} (iPhone14,5; U; CPU iOS 17_6 like Mac OS X;)"
private IOS_VERSION = "17.6.1.21G93" # Major.Minor.Patch.Build
Copy link
Member

Choose a reason for hiding this comment

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

The IOS version itself could probably also be increased.

Suggested change
private IOS_USER_AGENT = "com.google.ios.youtube/#{IOS_APP_VERSION} (iPhone14,5; U; CPU iOS 17_6 like Mac OS X;)"
private IOS_VERSION = "17.6.1.21G93" # Major.Minor.Patch.Build
private IOS_USER_AGENT = "com.google.ios.youtube/#{IOS_APP_VERSION} (iPhone14,5; U; CPU iOS 18_5 like Mac OS X;)"
private IOS_VERSION = "18.5.0.22F76" # Major.Minor.Patch.Build

Copy link
Member

Choose a reason for hiding this comment

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

Do note though that the future of Invidious is going to be through companion only which has its own versions, using youtube.js. And the main Invidious will mainly use the WEB client.

Copy link
Member

Choose a reason for hiding this comment

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

Are we also planning on migrating InnerTube requests for non /player endpoints to companion as well? Because if not I can at least still see some possible scenarios where we'll need to use the other clients to fetch certain data from YouTube if they decide to remove it from the WEB client for example.

Copy link
Member Author

Choose a reason for hiding this comment

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

Are we also planning on migrating InnerTube requests for non /player endpoints to companion as well?

I don't think that is necessary until it gets hard to maintain due to blockages on other parts of Youtube other than trying to watch a video

private ANDROID_APP_VERSION = "19.35.36"
private ANDROID_VERSION = "13"
private ANDROID_USER_AGENT = "com.google.android.youtube/#{ANDROID_APP_VERSION} (Linux; U; Android #{ANDROID_VERSION}; en_US; SM-S908E Build/TP1A.220624.014) gzip"
private ANDROID_SDK_VERSION = 33_i64
Copy link
Member

Choose a reason for hiding this comment

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

(Just a comment not a blocking code review) Wait why was ANDROID_SDK_VERSION even originally a 64 bit integer instead of Crystal's default 32 bit integer? I mean it doesn't really matter but its odd that this one constant was singled out to become a 64 bit integer especially when the value shouldn't ever even come close to the signed 32 bit integer limit...

@zackwithak13

This comment was marked as spam.

@bbsixzz

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Large youtube playlists return status code 500 from Youtube API
5 participants