Win Creating your first Youtube Add-on
#16
No this only works for a single youtube channel ID
Reply
#17
(2016-02-08, 22:12)zag Wrote: No this only works for a single youtube channel ID

Is there a way to setup a per link add-on?
Reply
#18
This is excellent, thank you!
Reply
#19
This is really helpful, thanks!
Reply
#20
Is there any way to link to a playlist rather than a channel?
Reply
#21
Will this only work on Windows PCs? I have tried it on Ubuntu 14.04 and am getting no joy?
HTPCs: 2 x Chromecast with Google TV
Audio: Pioneer VSX-819HK & S-HS 100 5.1 Speakers
Server: HP Compaq Pro 6300, 4GB RAM, 8.75TB, Bodhi Linux 5.x, NFS, MySQL
Reply
#22
Current Youtube API troubles are causing the familliar "Project marked for deletion error". I notice that some addons are functioning under the latest upgrade (5.1.17), and some aren't. Does something need to be changed at the addon level to eliminate the error?
Reply
#23
(2016-02-08, 18:58)liquidgee Wrote:
(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?

Yes you can link directly to a video. As you can see in the example, thumbnail pointing to jpg for icon and fanart pointing to bigger jpg for background image. Most important is to be sure parameter 'folder=False', if by mistake you set 'folder=True', then when you click the video link in kodi gui, the video will not play, instead you get a new blank menu page.

Here's example 1:
Code:
plugintools.add_item(
    #action="",
    title="Wheel of Musical Impressions with Demi Lovato",
    url="plugin://plugin.video.youtube/play/?video_id=GWpVTGnr_hA",
    thumbnail="https://i.ytimg.com/vi/GWpVTGnr_hA/mqdefault.jpg",
    fanart="https://i.ytimg.com/vi/GWpVTGnr_hA/hqdefault.jpg",
    folder=False )

example 2 code: Here I separate the youtube video id and assign it to v_id_1 variable. Both ways will work.

Code:
v_id_1 = "GWpVTGnr_hA"

plugintools.add_item(
    #action="",
    title="Wheel of Musical Impressions with Demi Lovato",
    url="plugin://plugin.video.youtube/play/?video_id=%s" % v_id_1,
    thumbnail="https://i.ytimg.com/vi/GWpVTGnr_hA/mqdefault.jpg",
    fanart="https://i.ytimg.com/vi/GWpVTGnr_hA/hqdefault.jpg",
    folder=False )
Get the Best of NHK video add-on for Kodi 19. Install via my k19-addons repository.
Reply
#24
(2016-02-17, 12:36)abbodj Wrote: Is there any way to link to a playlist rather than a channel?

Yes, you can link to a playlist.

Example 1:

Code:
plugintools.add_item(
    #action="",
    title="Best of Fallon",
    url="plugin://plugin.video.youtube/playlist/PLykzf464sU9-aOpnO-5cvGNU_p-lVjIv-/",
    thumbnail="https://yt3.ggpht.com/-x3CU1CXklQI/AAAAAAAAAAI/AAAAAAAAAAA/jPQ9GJeU53g/s100-c-k-no/photo.jpg",
    folder=True )

Example 2: Same as above except playlist id is assigned to pl_id_1 variable. Both have the same result.

Code:
pl_id_1 = "PLykzf464sU9-aOpnO-5cvGNU_p-lVjIv-"

plugintools.add_item(
    #action="",
    title="Best of Fallon",
    url="plugin://plugin.video.youtube/playlist/%s/" % pl_id_1,
    thumbnail="https://yt3.ggpht.com/-x3CU1CXklQI/AAAAAAAAAAI/AAAAAAAAAAA/jPQ9GJeU53g/s100-c-k-no/photo.jpg",
    folder=True )
Get the Best of NHK video add-on for Kodi 19. Install via my k19-addons repository.
Reply
#25
(2016-02-17, 21:25)speedwell68 Wrote: Will this only work on Windows PCs? I have tried it on Ubuntu 14.04 and am getting no joy?

Coding in python so will work across all platforms that kodi runs on. I would guess you have indenting errors in your code. Other minor coding mistakes like missing a comma " , " for instance can cause problems too. Best is to review the code from a known good working addon and emulate it. Don't give up, it's probably something minor and you'll kick yourself once you find it.

(2016-02-25, 22:04)RPico Wrote: Current Youtube API troubles are causing the familliar "Project marked for deletion error". I notice that some addons are functioning under the latest upgrade (5.1.17), and some aren't. Does something need to be changed at the addon level to eliminate the error?

All youtube based addons using this code method will work properly if the youtube addon has the working api keys put in the proper places. I read comments in the main youtube thread that user ids no longer work, change to channel ids. That is not true. If working api keys (in youtube addon) are installed properly, then user id, channel id, playlist id and video id will work with this method.
Get the Best of NHK video add-on for Kodi 19. Install via my k19-addons repository.
Reply
#26
@misty01, @zag the addon says fail to install after I zipped it up. can you please look at the file and see what I did wrong.
https://dl.dropboxusercontent.com/u/3542...master.zip
Reply
#27
Just downloaded and took a quick look at the add-on structure, did not run it. You must be on Mac OS because there is a .DS_Store file in the add-on folder. This will prevent the add-on from installing from zip. Use CleanArchiver to auto-remove .DS_Store and Mac resource forks while it zips your add-on. Use normal zip, not any of the other zip methods offered by CleanArchiver.

Edit:

Ok, I loaded your add-on, but you have some issues.

Code:
Just a small part of your code.

YOUTUBE_CHANNEL_ID1 = "theUrltv"
.
.
.
.
    plugintools.add_item(
        #action="",
        title="Urban Rap League TV",
        url="plugin://plugin.video.youtube/user/"theUrltv"/",
        thumbnail="https://www.dropbox.com/home/Public/Plugin%20icons?preview=URLTV.jpg",
        folder=True )

You are assigning value 'theUrltv' to variable 'YOUTUBE_CHANNEL_ID1', but later you don't call the variable. Also you use quotes where it causes a problem.

Working example 1:
Code:
YOUTUBE_CHANNEL_ID1 = "theUrltv"
.
.
.
.
    plugintools.add_item(
        #action="",
        title="Urban Rap League TV",
        url="plugin://plugin.video.youtube/user/"+YOUTUBE_CHANNEL_ID1+"/",
        thumbnail="https://www.dropbox.com/home/Public/Plugin%20icons?preview=URLTV.jpg",
        folder=True )

OR

    plugintools.add_item(
        #action="",
        title="Urban Rap League TV",
        url="plugin://plugin.video.youtube/user/%s/" % YOUTUBE_CHANNEL_ID1,
        thumbnail="https://www.dropbox.com/home/Public/Plugin%20icons?preview=URLTV.jpg",
        folder=True )

Working example 2:
Code:
YOUTUBE_CHANNEL_ID1 = "theUrltv"   #<< this line not needed if coded like below
.
.
.
.
    plugintools.add_item(
        #action="",
        title="Urban Rap League TV",
        url="plugin://plugin.video.youtube/user/theUrltv/",
        thumbnail="https://www.dropbox.com/home/Public/Plugin%20icons?preview=URLTV.jpg",
        folder=True )

Hope that helps.
Get the Best of NHK video add-on for Kodi 19. Install via my k19-addons repository.
Reply
#28
@misty01, I cleaned it up and it installed but I get api error saying it is not enabled. How do I fix that issue.
Reply
#29
That may have something to do with the youtube add-on being broken currently with API key needing to be replaced. Check the other thread for the fix.

http://forum.kodi.tv/showthread.php?tid=200735&page=243
Reply
#30
Thanks, @zag, @ Misty01 now that I have that working. How can I create a custom view so that it defaults to thumbnail view. In addition, how can I do custom search in the channel for particular video(s). In addition can I also create a private channel and have people view it with the code I give them.
Reply

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