Win Creating your first Youtube Add-on
#1
Here is a quick guide on creating an add-on that can browse any specific Youtube channel. It uses the plugin tools module from Jesús, so thanks to him its very easy.
I wanted to create a specific youtube channel Add-on as I browse a it regularly and wanted a quick way to get to those with minimum fuss.
I just copied an existing add-on I found, so please feel free to comment on the code or way of doing things. I'm always looking to improve.


Step 1 Setup your environment
First thing is to setup the development environment for windows to create and edit Kodi Addons
I'd suggest using notepad++ to edit the source python and xml files.
Now install a blank version of Kodi on your development computer.
Now create a shortcut on your desktop to C:\Users\yourusername\AppData\Roaming\Kodi\addons. This will allow you to edit the files quickly.

Step 2 Setup the add-on
Download the source template for this add-on https://github.com/zag2me/plugin.video.fullycharged
Extract the source into a folder like this
Image

Notice we are not copying this to the kodi userdata folder yet. We have some work to do to change the youtube channel and add-on metadata first.

Step 3 Edit the Add-on code
Now open the default.py file with notepad++.
On line 3 select "FULLYCHARGEDSHOW" with the mouse cursor, then hit ctrl + h on your keyboard
Now enter the youtube channel id you want into the replace field like so. You can find the channel ID by going to youtube and searching for a channel. Then copy the ID after /user/.

Image
Hit replace all, and you should see the code change in all the correct places.
At this point you will also want to change the Add-on title on line 43.

Step 4 Edit the Addon metadata
Now open the add.xml file with notepad++
Enter your own details for the different fields one at a time from the top.
You will need to give your Add-on a name and enter the correct contact details further down the bottom of the file.
Make sure you give it a good description.

Step 5 Add icon and fanart
Now make a new icon and fanart pictures and replace the current one icon.png and fanart.jpg in the Add-on folder.

Step 6 Zip up and install
Go back to the C:\Code folder and zip up the Add-on into a single file by clicking the Add-on folder and send to >> zip file.
Now load up Kodi and install your Add-on from a zip file. This is important as it will also install the dependencies needed such as the youtube module.
You can now switch back to your desktop and click the shortcut you made earlier and you should see the complete Add-on installed in there.
Now go back to Kodi and launch the Add-on. All being well, you should be able to browse the youtube channel now from inside Kodi!

Congratulations you've just created your first Kodi Youtube Channel Add-on!! Big Grin
Reply
#2
Thanks. Is it possible to put multiple channels in the addon or only 1?
Reply
#3
Yes, interesting question... i have already copied and posted several youtube addons on the forum (boiler room, pitchfork, worldsurfleague and street league skateboarding... wanted to make one for bmx but didn´t)...

But know i would like to make (or just an idea) one with groups of different channels... more or less like: group 1 - channel 1, channel 2, etc; group 2 - channel 1, channel 2, etc; etc, etc-

Because Kodi could be much more with free and public content well organized (mainly from the free internet).... don´t know if kodi is becoming more like tv and it´s content, or the tv is becoming more like kodi... if you know what i mean... so kodi... as a lot of customization and a lot of revolutionary potencial... and for all different kind of tastes.
Reply
#4
(2015-12-31, 09:56)misa Wrote: Thanks. Is it possible to put multiple channels in the addon or only 1?

Yes it is, see a detailed explanation of doing this here from misty who wrote the original Add-on.

https://github.com/zag2me/plugin.video.f...d/issues/1
Reply
#5
Thanks thats looks great! Smile
Reply
#6
Hi Zag could you help me on the code?

Quote:def main_list(params):
plugintools.log("XFactorInternational.main_list "+repr(params))

plugintools.add_item(
#action="",
title="X Factor Adria",
url="plugin://plugin.video.youtube/channel/"+YOUTUBE_CHANNEL_ID1+"/",
thumbnail=icon,
folder=True )

On this part like i said on my post i would like to add a group(1. folder, 2. folder) and then the channels(1.1 folder + 1.2 folder)

How do i make this? something like this?

def main_list(params):
plugintools.log("Addonname.main_list "+repr(params))

plugintools.add_item(
#action="",
title="1. Folder",
thumbnail=icon,
folder=True )
#action="",
title="1.1 folder",
url="plugin://plugin.video.youtube/channel/"+YOUTUBE_CHANNEL_ID1+"/",
thumbnail=icon,
folder=True )
#action="",
title="1.2 folder",
url="plugin://plugin.video.youtube/channel/"+YOUTUBE_CHANNEL_ID2+"/",
thumbnail=icon,
folder=True )
#action="",
title="2. Folder",
thumbnail=icon,
folder=True )
#action="",
title="2.1 folder",
url="plugin://plugin.video.youtube/channel/"+YOUTUBE_CHANNEL_ID3+"/",
thumbnail=icon,
folder=True )
#action="",
title="2.2 folder",
url="plugin://plugin.video.youtube/channel/"+YOUTUBE_CHANNEL_ID4+"/",
thumbnail=icon,
folder=True )


And some of the youtube channel videos have subtitles not embedded but in the video wich you can turn on and off... and i would like that all of them would be with the subtitles on.

how do i do this? can you help?
Reply
#7
anyone got the multiple channels to work?
Reply
#8
(2016-02-03, 12:54)johnbless Wrote: anyone got the multiple channels to work?

Yes check here https://github.com/zag2me/plugin.video.f...d/issues/1
Reply
#9
(2016-02-03, 14:50)zag Wrote:
(2016-02-03, 12:54)johnbless Wrote: anyone got the multiple channels to work?

Yes check here https://github.com/zag2me/plugin.video.f...d/issues/1

Tried that and I am getting errors.
----------------
Quote:CGUIMediaWindow::GetDirectory(addons://sources/)failed
XFILE::CDirectory::GetDirectory - Error getting addons://sources/
CGUIMediaWindow::GetDirectory(plugin://plugin.video.jazzy/) failed
XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.video.jazzy/
Reply
#10
anyone, someone ?HuhRolleyes
Reply
#11
Hi,

I also want to do an Addon with a favorite channel. But I found a problem, because I can't find the user link to the channel, because I only can get the new link youtube.com/c/id.... How I need to change the addon to get it working?
Reply
#12
The channel name is usually

https://www.youtube.com/user/channelname
Reply
#13
(2016-02-05, 23:27)zag Wrote: Teh channel name is usually

https://www.youtube.com/user/channelname

did you try to add the multiple channels on yours to see if it works ? Zag?
Reply
#14
No the guide is for a single channel.

For multiple channels I use the YouTube addon
Reply
#15
(2015-12-30, 14:59)zag Wrote: Here is a quick guide on creating an add-on that can browse any specific Youtube channel. It uses the plugin tools module from Jesús, so thanks to him its very easy.
I wanted to create a specific youtube channel Add-on as I browse a it regularly and wanted a quick way to get to those with minimum fuss.
I just copied an existing add-on I found, so please feel free to comment on the code or way of doing things. I'm always looking to improve.

Im trying to create an add-on using different YouTube links but not a whole channel. Will the individual link to certain video work the same way?
Reply

Logout Mark Read Team Forum Stats Members Help
Creating your first Youtube Add-on1