diff --git a/src/invidious/yt_backend/youtube_api.cr b/src/invidious/yt_backend/youtube_api.cr index 727ce9a3..b1c2c288 100644 --- a/src/invidious/yt_backend/youtube_api.cr +++ b/src/invidious/yt_backend/youtube_api.cr @@ -306,6 +306,12 @@ module YoutubeAPI } of String => String | Int64, } + visitor_data = REDIS_DB.get("VISITORDATA") + + if visitor_data + client_context["client"]["visitorData"] = visitor_data + end + # Add some more context if it exists in the client definitions if !client_config.screen.empty? client_context["client"]["clientScreen"] = client_config.screen @@ -488,6 +494,9 @@ module YoutubeAPI "html5Preference": "HTML5_PREF_WANTS", }, }, + "serviceIntegrityDimensions" => { + "poToken": REDIS_DB.get("POTOKEN"), + }, } # Append the additional parameters if those were provided