2023-04-28, 06:57
Works like a charm after changing out that file. Thanks for the help!
Jomjom79
Jomjom79
(2023-04-27, 22:30)StrangeAlien Wrote: That's video_info.py for Kodi Leia (checked on 18.9). Download it and replace existing file in addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper folder. Reboot device (just restart Kodi isn't enough) and You're back in business, including MPEG-DASH with 1080 support
(2023-04-28, 20:20)Kaylakaze Wrote: I'm still getting the issue where the videos are stopping partway through. It does it with both MPEG-DASH and without.
(2023-04-27, 18:50)arsMOBILIS Wrote: Ok, it looks like a figured out a solution for the "The following content is not available on this app." error which lets you stay on a stable add-on release. You still have to disable MPEG-DASH for now, but I think this is a separate issue since it affects all the alpha versions as well and I can't see the add-on team releasing two alpha versions with this problem if it was was happening to them at release time. About 2 months ago I saw the same MPEG-DASH problem pop up for a couple of days but then it just went away by itself. I suspect if we are patient it will resolve itself this time too but in the meantime we just have to be patient for a while.
A little while back some people were saying to edit video_info.py to change the Android client info to send to YouTube, but nobody seemed sure what to change it to. When I tested the 6.8.26.Alpha1 version (and Alpha2) the "not available" error was gone and it occurred to me that it might be possible to retro-fit the Android client version fix in 6.8.26.Alpha1 or Alpha2 into the last stable add version (I'm using 6.8.25 Unofficial). I found the new code and pasted it over the old code and it seems to work perfectly (except for the MPEG-DASH issue). These instructions are for 6.8.2.25 but they should work for the latest stable 7.x release too.
First with a stable version of the add-on installed open video_input.py and find the block of code which looks like this (somewhere around line 742)...
payload = {'videoId': video_id,
'context': {'client': {'clientVersion': '16.49', 'gl': self.region,
'clientName': 'ANDROID', 'hl': self.language}},
'thirdParty': {'embedUrl': 'https://google.com'}
}
...and completely replace it with this code from the alpha versions...
ANDROID_APP_VERSION = '18.14.41'
headers['User-Agent'] = 'com.google.android.youtube/%s ' \
'(Linux; U; Android 12; US) gzip' % ANDROID_APP_VERSION
payload = {'videoId': video_id,
'contentCheckOk': True,
'racyCheckOk': True,
'context': {'client': {'clientVersion': ANDROID_APP_VERSION,
'clientName': 'ANDROID',
'gl': self.region,
'hl': self.language,
'androidSdkVersion': 31,
'osName': 'Android',
'osVersion': '12',
'platform': 'MOBILE'}},
}
I restarted Kodi for good measure but you probably don't need to. I've tested this on my FireTV and Windows 10 installations and it works on both. Now I just have to wait for MPEG-DASH to start working properly again.
(2023-04-29, 01:58)Yubby Wrote: Though, you can view the videos that return that error via a web browser.. ( https://www.youtube.com/watch?v=guXMb7zLblM )
(2023-04-27, 18:50)arsMOBILIS Wrote: [...]im also verifying that this works for my Youtube plugin 6.8.25 in Kodi Krypton 17.6 (DS Player Edition) even with MadVR and SVP 3(ffdshow) on Windows 10
First with a stable version of the add-on installed open video_input.py and find the block of code which looks like this (somewhere around line 742)...
payload = {'videoId': video_id,
'context': {'client': {'clientVersion': '16.49', 'gl': self.region,
'clientName': 'ANDROID', 'hl': self.language}},
'thirdParty': {'embedUrl': 'https://google.com'}
}
...and completely replace it with this code from the alpha versions...
ANDROID_APP_VERSION = '18.14.41'
headers['User-Agent'] = 'com.google.android.youtube/%s ' \
'(Linux; U; Android 12; US) gzip' % ANDROID_APP_VERSION
payload = {'videoId': video_id,
'contentCheckOk': True,
'racyCheckOk': True,
'context': {'client': {'clientVersion': ANDROID_APP_VERSION,
'clientName': 'ANDROID',
'gl': self.region,
'hl': self.language,
'androidSdkVersion': 31,
'osName': 'Android',
'osVersion': '12',
'platform': 'MOBILE'}},
}
[...]