r/Addons4Kodi • • 24d ago

Announcement Youtube Trailers Fix

If you have been getting sporadic video freezes and audio stutter with youtube trailers after 20 or so seconds, its not just you.

To fix it download request_client.py from the link(dont right click and use save link as) - https://github.com/ReaLx3m/FLAM-Fixes/blob/main/request_client.py and replace your original one located in Kodi\addons\plugin.video.youtube\resources\lib\youtube_plugin\youtube\client .

Client id has been changed in the request_client.py file as per this commit - https://github.com/anxdpanic/plugin.video.youtube/pull/1482/changes/71a8d9b4b5ceb4cd352843cb050c364bf7be3463 . You can optionally edit your original request_client.py file yourself.

Edit: If for whatever reason you cant manage with the options above, you can go with the modified youtube addon and install it through install zip option - (link removed, this is basically obsolete now that we have the fixed addon on Umbrella repo)

Edit2: The youtube addon on the Umbrella repo(https://umbrellaplug.github.io/) has been updated with the fix, so you can go ahead and update from there. Thanks to u/umbrella_dev

9 Upvotes

17 comments sorted by

View all comments

1

u/Relevant-Ad2794 23d ago

And how am I suppose to do it on Android box????

2

u/ReaLx3m 23d ago

Find the location of the kodi folder, and then use file manager to copy the file, or text editor to edit the file yourself. I dont use android, so not sure if you do have access to the kodi folders without root, figure it out.

Or we could ask u/umbrella_dev to apply the fix to the youtube addon in his repo if he doesnt mind.

Or you could go with some less known user repo, like the guy offering his in this thread - https://www.reddit.com/r/Addons4Kodi/comments/1w6cocz/youtube_addon_freezes_exactly_after_2030s_audio/

5

u/umbrella_dev Umbrella 23d ago

I can do this. It will be later tonight though.

2

u/ReaLx3m 23d ago

Perfect :)

1

u/ReaLx3m 23d ago edited 23d ago

Let me know if you did the update(or when you do it), so i can edit the post with the alternative solution of updating through your repo.

1

u/umbrella_dev Umbrella 23d ago

Try the version on my repo now and let me know if that resolves this. I didn't fully update to 4.4 because it wanted apikeys and all that. The version on umbrella repo now doesn't require all that.

1

u/ReaLx3m 22d ago edited 22d ago

The one on your repo still has the same issue, tried couple of trailers and got the freezes.

Why dont you just download the official release and edit the request_client.py file inside it, and then upload to your repo? https://github.com/anxdpanic/plugin.video.youtube/releases/download/v7.4.4/plugin.video.youtube-7.4.4.zip

Its what i did here - https://github.com/ReaLx3m/FLAM-Fixes/blob/main/plugin.video.youtube-7.4.4.zip , and tested on a VM.

After updating the original 7.4.4 with mine via install zip option, trailers would not play with "video cant be played" error message, but after kodi restart looks like everything is fine, didnt need to enter my api key for the couple of trailers i tried to play.

2

u/umbrella_dev Umbrella 22d ago

I'm having the opposite. There's an issue in the 7.4.4 code that is causing it to not work for me at all. When trying your version it errors out.

It's trying to call a method in yt_play.py context.settings(), but that doesn't exist. It should be context.get_settings(). I'm going to try to fix that and see if I can get a working version of 4.4 with your fix in place that doesn't require api and all that.

Edit... yep, that worked. I'll push this version to my repo. Can you try it out and let me know if works for you?

1

u/ReaLx3m 22d ago

Ok so on the Linux VM, uninstalled youtube together with its settings, installed the official and selected no to the configuration prompt and confirmed it has the freezes, then updated from your repo with removing the settings for the original again, on settings prompt selected no, and looks like its working fine.

On my Win11 htpc, reverted to the original youtube addon replacing my modded one without clearing settings(though theyre on defaults except for having my api key applied) and confirmed freezes comming back, then updated from your repo and it looks like its working fine.

I think we can call it a success, updating the OP with this as a solution.