Win Creating your first Youtube Add-on - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Tips, tricks, and step by step guides (https://forum.kodi.tv/forumdisplay.php?fid=110) +--- Thread: Win Creating your first Youtube Add-on (/showthread.php?tid=254207) |
Creating your first Youtube Add-on - zag - 2015-12-30 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 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/. 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!! RE: Creating your first Youtube Add-on - misa - 2015-12-31 Thanks. Is it possible to put multiple channels in the addon or only 1? RE: Creating your first Youtube Add-on - Norin_Radd - 2016-01-05 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. RE: Creating your first Youtube Add-on - zag - 2016-01-05 (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.fullycharged/issues/1 RE: Creating your first Youtube Add-on - Borge_30 - 2016-01-05 Thanks thats looks great! RE: Creating your first Youtube Add-on - Norin_Radd - 2016-01-07 Hi Zag could you help me on the code? Quote:def main_list(params): 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? RE: Creating your first Youtube Add-on - johnbless - 2016-02-03 anyone got the multiple channels to work? RE: Creating your first Youtube Add-on - zag - 2016-02-03 (2016-02-03, 12:54)johnbless Wrote: anyone got the multiple channels to work? Yes check here https://github.com/zag2me/plugin.video.fullycharged/issues/1 RE: Creating your first Youtube Add-on - johnbless - 2016-02-03 (2016-02-03, 14:50)zag Wrote:(2016-02-03, 12:54)johnbless Wrote: anyone got the multiple channels to work? Tried that and I am getting errors. ---------------- Quote:CGUIMediaWindow::GetDirectory(addons://sources/)failed RE: Creating your first Youtube Add-on - johnbless - 2016-02-04 anyone, someone ? RE: Creating your first Youtube Add-on - coyote82 - 2016-02-05 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? RE: Creating your first Youtube Add-on - zag - 2016-02-05 The channel name is usually https://www.youtube.com/user/channelname RE: Creating your first Youtube Add-on - johnbless - 2016-02-06 (2016-02-05, 23:27)zag Wrote: Teh channel name is usually did you try to add the multiple channels on yours to see if it works ? Zag? RE: Creating your first Youtube Add-on - zag - 2016-02-06 No the guide is for a single channel. For multiple channels I use the YouTube addon RE: Creating your first Youtube Add-on - liquidgee - 2016-02-08 (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. 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? |