kodi 20.1 with alpha5 all videos run at 720p max, when I go to addon settings / advanced / check alternative client details I am able to choose 1080p, however it has the nonstop buffering issue
Fix von Rferreira2k
Spoiler anzeigen
def _method_get_video_info(self, video_id):
headers = self.MOBILE_HEADERS.copy()
params = None
if self._access_token:
headers['Authorization'] = 'Bearer %s' % self._access_token
else:
params = {
'key': self._api_key
}
video_info_url = 'https://youtubei.googleapis.com/youtubei/v1/player'
payload = {
'videoId': video_id,
'context': {
'client': {
'hl': self.language,
'gl': self.region,
'clientName': 'TV_UNPLUGGED_ANDROID',
'clientVersion': '1.37',
'androidSdkVersion': 31,
'osName': 'Android',
'osVersion': '12',
'platform': 'MOBILE'
}
}
}
player_response = {}
for attempt in range(2):
try:
r = requests.post(video_info_url, params=params, json=payload,
headers=headers, verify=self._verify, cookies=None,
allow_redirects=True)
r.raise_for_status()
player_response = r.json()
if player_response.get('playabilityStatus', {}).get('status', 'OK') in \
('AGE_CHECK_REQUIRED', 'UNPLAYABLE', 'CONTENT_CHECK_REQUIRED') and attempt == 0:
payload['context']['client']['clientName'] = 'ANDROID_EMBEDDED_PLAYER'
payload['context']['client']['clientVersion'] = '18.15.35'
continue
except:
error_message = 'Failed to get player response for video_id "%s"' % video_id
self._context.log_error(error_message + '\n' + traceback.format_exc())
raise YouTubeException(error_message)
Diese Änderung erlaubt auch 4k HDR mit dem VP9-Codec auf v7.0.1 stable Nexus