Kodi Community Forum
Release YouTube - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Video Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=154)
+---- Thread: Release YouTube (/showthread.php?tid=356934)



RE: YouTube - pmrtvcom - 2024-09-02

https://paste.kodi.tv/jukikiqero.kodi


RE: YouTube - caperucitaferoz - 2024-09-02

Hi! I've been using...
Code:
xbmc.executebuiltin('RunPlugin(plugin://plugin.video.youtube/play/?video_id=q1stQKQry9o)')
it for a while to play some trailers obtained from tmdb, but in the latest version of the addon youtube it seems that this system no longer works.

In the log I see...
Quote:[plugin.video.youtube] Running: YouTube (7.0.9.2) on Omega (Kodi-21.1) with Python 3.8.15
Path: /play/
Params: {'video_id': 'q1stQKQry9o'}
...but then it doesn't play and there are no more errors from the addon.


RE: YouTube - iceman20k - 2024-09-03

(2024-09-02, 21:32)caperucitaferoz Wrote: Hi! I've been using...
Code:
xbmc.executebuiltin('RunPlugin(plugin://plugin.video.youtube/play/?video_id=q1stQKQry9o)')
it for a while to play some trailers obtained from tmdb, but in the latest version of the addon youtube it seems that this system no longer works.

In the log I see...
Quote:[plugin.video.youtube] Running: YouTube (7.0.9.2) on Omega (Kodi-21.1) with Python 3.8.15
Path: /play/
Params: {'video_id': 'q1stQKQry9o'}
...but then it doesn't play and there are no more errors from the addon.
I got the same issue...


RE: YouTube - mejico - 2024-09-04

Approximately 2 weeks ago the resume function stopped working, so if you stop a video during playback and then play the same video it doesn't give you the option to resume, it always plays from the start. I'm running Kodi 19.1 on a Windows platform.  I updated the plugin to v7.0.9.2 and I also redid the APi keys, but to no avail.  I didn't want to raise a bug report on Github in case there was an easy fix.  Cheers


RE: YouTube - mklopez1 - 2024-09-04

I have the same issue as mejico. Resume points are not being saved, but the problem doesn't happen with every video.

I have some playlists with old, long videos that I watched and paused some weeks ago, and they have resume points saved. I can even restart them, watch for a while and stop them, and their new resume points are saved normally. The most recent ones that work are from about a month ago. But for any other, more recent video that I've start watching, resume points are not saved. Seems it only works if the video was already in the "resume point database" before a recent plugin version.

I'm on Kodi 19.5, on Windows. I tried rolling back the plugin to 7.0.9 and 7.0.9.1 but both have the same issue. Should I try one of the beta versions?


RE: YouTube - MoojMidge - 2024-09-04

(2024-09-02, 00:13)malvinas2 Wrote: I created new API-keys and tried four times to log in, but the error still exists. 

Need to follow the instructions provided, should work after that. See the link in comment in https://forum.kodi.tv/showthread.php?tid=356934&pid=3208286#pid3208286
 
(2024-09-02, 06:50)phyrros1 Wrote: Super, thanks a lot!

You can test whether it works using: https://github.com/MoojMidge/plugin.video.youtube/archive/refs/heads/master.zip

@pmrtvcom, @sneezing_subsystem - the issue with the lack of audio with live streams is a specific issue with InputStream.Adaptive. It is already fixed but you will need to upgrade to Kodi 21. Alternatively change
Code:
Settings > Advanced > InputStream.Adaptive > Use for live streams
To MPEG-DASH (will be low quality video) or Multi-stream HLS (will be slow to load)
 
(2024-09-02, 11:40)fatsteve Wrote: Thumbnails are not loading for a handful (1 or 2 in the list of 50) of videos in the My Subscriptions list. 

Can you get a debug log of this? Or provide an example of channels/videos that don't load the thumbnails?

@caperucitaferoz, @iceman20k - you shouldn't be using RunPlugin to play a video, that is what the PlayMedia builtin is intended for. The workarounds that allowed this to work in the past were removed in v7.0.8 because they caused issues with resuming and adding videos to playlists, but I think it can be added back in without causing too many other side effects. You can test whether it works using: https://github.com/MoojMidge/plugin.video.youtube/archive/refs/heads/master.zip

@mejico, @mklopez1 - seems to work fine for me. Can you get a debug log?


RE: YouTube - caperucitaferoz - 2024-09-04

Thank you very much for your reply.
Indeed, with this beta the call through RunPlugin works again.

Can I share this zip publicly while I make the changes to my code?


RE: YouTube - tadly - 2024-09-05

Yesterday I used youtubes migration feature for "brand" channels, something I used to separate my youtube from my youtube music activity.
Youtube was the "main" channel and music the brand one meaning I migrated the brand ontop the normal one.

After doing the migration, youtube kodi started trowing errors when going to subscriptions, watch later, etc.
The only menu entry that returns something is "Recommendations".

By now I have..
* created new api-keys,
* re-logged a bunch of times
* deleted the youtube addon-dir and started fresh
...but no dice.

Logging in works without errors, playback also works when I send it from firefox or android.

The logs are for opening "Playlists" and "Subscriptions".
Playlists:
pulabuloko.kodi (paste)

Subscriptions:
iqigogibek.kodi (paste)

Anyone got an idea whats going on?


RE: YouTube - tadly - 2024-09-05

I "fixed" it.

Issues had something to do with there still being a second account/channel thing that had no subscriptions etc. which seemingly was my ACTUAL PERSONAL account.
The one with my subscriptions was still bound to the brand account.

After moving the brand account to the empty personal one, everything works.
I did loose my entire watch-history though.
At least my subscriptions, likes on youtube music and most (sadly not all) playlists are still there.

The complexity of the google account ecosystem really makes me wanna move away...


RE: YouTube - sneezing_subsystem - 2024-09-05

(2024-09-04, 14:03)MoojMidge Wrote: @pmrtvcom, @sneezing_subsystem - the issue with the lack of audio with live streams is a specific issue with InputStream.Adaptive. It is already fixed but you will need to upgrade to Kodi 21. Alternatively change
Code:
Settings > Advanced > InputStream.Adaptive > Use for live streams
To MPEG-DASH (will be low quality video) or Multi-stream HLS (will be slow to load)

Awesome - Thank you very much.


RE: YouTube - scott967 - 2024-09-06

(2024-09-04, 14:03)MoojMidge Wrote: @caperucitaferoz, @iceman20k - you shouldn't be using RunPlugin to play a video, that is what the PlayMedia builtin is intended for. The workarounds that allowed this to work in the past were removed in v7.0.8 because they caused issues with resuming and adding videos to playlists, but I think it can be added back in without causing too many other side effects. You can test whether it works using: https://github.com/MoojMidge/plugin.video.youtube/archive/refs/heads/master.zip

I also have been maintaining a plugin "script.extendedinfo" that among other things displays a dialog window with filtered youtube widget panel, the onclick for the listitems gets routed to a handler which calls
python:
xbmc.executebuiltin("RunPlugin(plugin://plugin.video.youtube/play/?video_id=" + youtube_id + "&screensaver=true&incognito=true)")
that no longer plays the video.  Kodi logs
 
Code:
CScriptRunner: running add-on script YouTube('plugin://plugin.video.youtube/play/', '-1', '?video_id=7dOcH4HN5fA&screensaver=true&incognito=true')
'...
info <general>: [plugin.video.youtube] Running: YouTube (7.0.9.2) on Piers (Kodi-22.0) with Python 3.8.15
                                                   Path: /play/
                                                   Params: {'video_id': '7dOcH4HN5fA', 'screensaver': True, 'incognito': True}

Full log eporitupun.kodi (paste)
Will check out your test file later today.

scott s.
.


RE: YouTube - fatsteve - 2024-09-06

(2024-09-02, 11:40)fatsteve Wrote: Thumbnails are not loading for a handful (1 or 2 in the list of 50) of videos in the My Subscriptions list. 
(2024-09-04, 14:03)MoojMidge Wrote: Can you get a debug log of this? Or provide an example of channels/videos that don't load the thumbnails?



Hi. Most recent example of videos this happens with are here and here.

Just a reminder, this is only happening in the My Subscriptions list, so you will need to subscribe to the channel in order to attempt to recreate the problem.

Many Thanks, and Kind Regards.


RE: YouTube - daddmac - 2024-09-06

Thank you MoojMidge!  I'll work with that. 

Apologies for the late response, I missed the thread alert.


RE: YouTube - scott967 - 2024-09-06

As regards "RunPlugin", haven't tried the fix but did switch to "PlayMedia" which seems to work, so I probably will go that route.  Admit never understood how "RunPlugin" vs "Playmedia" vs "SetResolvedURL" work together.

scott s.
.


RE: YouTube - MoojMidge - 2024-09-07

(2024-09-04, 18:38)caperucitaferoz Wrote: Can I share this zip publicly while I make the changes to my code?

You can if you need to, but I wouldn't recomend using anything from my personal repository as it is only intended for testing/staging/backups and I make little/no effort to check or ensure things work. Bit busy at the moment but I will get around to releasing a new beta release shortly.
 
(2024-09-05, 11:48)tadly Wrote: The complexity of the google account ecosystem really makes me wanna move away...

Glad you figured it out and wrote up what the problem was. I had a similar issue when I first started working on the plugin - my Google account did not have a YouTube account associated with it so a lot of things just didn't work, for no apparent reason. Only realised when I tried to login using the YouTube website.
 
(2024-09-06, 04:02)fatsteve Wrote: Most recent example of videos this happens with are here and here.

I'll have a look. If I can't see anything obvious will probably still need a debug log.
 
(2024-09-06, 22:41)scott967 Wrote: switch to "PlayMedia" which seems to work, so I probably will go that route.  Admit never understood how "RunPlugin" vs "Playmedia" vs "SetResolvedURL" work together

I won't commit to keeping the RunPlugin play workaround in place. It was removed because it broke other things, and I only added it back in because other subsequent changes made it simpler to include without potentially causing other issues, however if further issues are reported, then I will have to remove it again.

PlayMedia is the builtin to use when you want to play something from a plugin url.

The simplest way to think of it is that playing something requires a Play action. RunPlugin is not intended to play anything and doesn't tell the Kodi player that something has been asked to play, while PlayMedia takes care of this implicitly. So a workaround has to be put in place to call the PlayMedia builtin manually which messes with various assumptions that Kodi makes about how the play action is initiated and means that the plugin essentially runs twice to play the video.

SetResolvedUrl can be thought of as linking an existing item in a listing, which the play action acts upon, with a new listitem that is generated on demand by the plugin and provides additional details for the Kodi player.