mirror of https://github.com/iv-org/invidious.git
use WEB when po_token + android test suite when no po_token
This commit is contained in:
parent
b173d4acf2
commit
b9ad9bd723
|
@ -53,9 +53,9 @@ end
|
||||||
def extract_video_info(video_id : String)
|
def extract_video_info(video_id : String)
|
||||||
# Init client config for the API
|
# Init client config for the API
|
||||||
client_config = YoutubeAPI::ClientConfig.new
|
client_config = YoutubeAPI::ClientConfig.new
|
||||||
# Use the WEB_CREATOR when po_token is configured because it fully only works on this client
|
# Use the WEB when po_token is configured
|
||||||
if CONFIG.po_token
|
if CONFIG.po_token
|
||||||
client_config.client_type = YoutubeAPI::ClientType::WebCreator
|
client_config.client_type = YoutubeAPI::ClientType::Web
|
||||||
end
|
end
|
||||||
|
|
||||||
# Fetch data from the player endpoint
|
# Fetch data from the player endpoint
|
||||||
|
@ -113,8 +113,8 @@ def extract_video_info(video_id : String)
|
||||||
new_player_response = try_fetch_streaming_data(video_id, client_config)
|
new_player_response = try_fetch_streaming_data(video_id, client_config)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Don't use Android client if po_token is passed because po_token doesn't
|
# Don't use Android test suite client if po_token is passed because po_token doesn't
|
||||||
# work for Android client.
|
# work for Android test suite client.
|
||||||
if reason.nil? && CONFIG.po_token.nil?
|
if reason.nil? && CONFIG.po_token.nil?
|
||||||
# Fetch the video streams using an Android client in order to get the
|
# Fetch the video streams using an Android client in order to get the
|
||||||
# decrypted URLs and maybe fix throttling issues (#2194). See the
|
# decrypted URLs and maybe fix throttling issues (#2194). See the
|
||||||
|
|
Loading…
Reference in New Issue