Kodi Community Forum
v21 Youtube addon - Like button - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: v21 Youtube addon - Like button (/showthread.php?tid=377087)



Youtube addon - Like button - kenmoon - 2024-04-12

I'm trying to implement a like button in the youtube addon.
I have referenced below.
https://kodi.wiki/view/Add-on:YouTube
Keymaps
Required version: 6.3.0+
A collection of actions available for custom keymaps.
Description Command Context
....
Like  RunPlugin(plugin://plugin.video.youtube/video/rate/?rating=like)
Dislike RunPlugin(plugin://plugin.video.youtube/video/rate/?rating=dislike) 
---
xml:

<control type="button" id="11750">
   <ondown>1630</ondown>
   <width>64</width>
   <height>64</height>
   <aspectratio>keep</aspectratio>
   <texturefocus colordiffuse="button_focus">special://skin/media/new_video_osd/like.png</texturefocus>
   <texturenofocus>special://skin/media/new_video_osd/like.png</texturenofocus>
   <onclick>RunPlugin(plugin://plugin.video.youtube/video/rate/?rating=like)</onclick>
</control>

Q1: Is it correct that the above code works to like on youtube app(Andriod) when the like button is pressed?
Q2: I want to confirm that "like" is pressed when the button is pressed, for example, I'm looking for a way to change the color of the like button image when clicked.