import os
import sys
import plugintools
import xbmc,xbmcaddon
from addon.common.addon import Addon

addonID = 'plugin.video.areskidstube'
addon = Addon(addonID, sys.argv)
local = xbmcaddon.Addon(id=addonID)
icon = local.getAddonInfo('icon')

YOUTUBE_CHANNEL_ID_1 = "UCKAqou7V9FAWXpZd9xtOg3Q"
YOUTUBE_CHANNEL_ID_2 = "UCKAqou7V9FAWXpZd9xtOg3Q"
YOUTUBE_CHANNEL_ID_3 = "UCS5Oz6CHmeoF7vSad0qqXfw"
YOUTUBE_CHANNEL_ID_4 = "UCqdGW_m8Rim4FeMM29keDEg"
YOUTUBE_CHANNEL_ID_5 = "UCLF-kfM8ZxHQ9lW_lpu_thw"
YOUTUBE_CHANNEL_ID_6 = "UChGJGhZ9SOOHvBB0Y4DOO_w"
YOUTUBE_CHANNEL_ID_7 = "UCh-sQC1L3J7xicFO1Bo5DeQ"
YOUTUBE_CHANNEL_ID_8 = "UCj5i58mCkAREDqFWlhaQbOw"
YOUTUBE_CHANNEL_ID_9 = "UCYVinkwSX7szARULgYpvhLw"
YOUTUBE_CHANNEL_ID_10 = "PLyQYDeMT9rIXgm2l5rDYKKCAn-rU-Ve57"
YOUTUBE_CHANNEL_ID_11 = "PLyQYDeMT9rIXgm2l5rDYKKCAn-rU-Ve57"
YOUTUBE_CHANNEL_ID_12 = "PLGjW3RdDiSWKzSLC5002310dB4BuOjJ67"
YOUTUBE_CHANNEL_ID_13 = "PL9mJLAxLpNXyhLb4EP4zSwpoDFeg8wTiq"
YOUTUBE_CHANNEL_ID_14 = "PLiluoe0QNL4EXc5qYPJWoqZ2iyBPk3ybk"
YOUTUBE_CHANNEL_ID_15 = "PLwp8m9anCLK3jmItMyLTgfNpM-526z8Cl"
YOUTUBE_CHANNEL_ID_16 = "PLL3uNn7f3npgkXGEU71mZSlb31vki3v-J"
YOUTUBE_CHANNEL_ID_17 = "PLz5oscIFhFGzYC6yGC3CeFwqzd2CVEsZn"
YOUTUBE_CHANNEL_ID_18 = "PLgpmL5TvSrJ6F4hMdVXTOCRT-KB9gxpn0"
YOUTUBE_CHANNEL_ID_19 = "PLZ-JeQ5iJof9b5EoGAIc2yZ-ekxcc_3K0"
YOUTUBE_CHANNEL_ID_20 = "PL9B75FA588C8C7BE8"
YOUTUBE_CHANNEL_ID_21 = "PLdR4xzYBFXRei_u2bn-uI7k4YT3nWrbqp"
YOUTUBE_CHANNEL_ID_22 = "PLl48xwXKg0_9xpwb9_bymEyAX9z6l3X2K"
YOUTUBE_CHANNEL_ID_23 = "PLgp6FeXIm4ckO5GmzQEz46FzfqFGTZGiu"
YOUTUBE_CHANNEL_ID_24 = "PL37301F6622816A12"
YOUTUBE_CHANNEL_ID_25 = "PLv5D_Yk_Nj1L_jEY12NULC3PqXMa3M4rS"
YOUTUBE_CHANNEL_ID_26 = "PLbKZNdh3NR8hYJDzxKufYefKZLjjY7e6c"
YOUTUBE_CHANNEL_ID_27 = "PLTSSq5rhyqOmdwAUQJccbQ1iYOk27fpvP"
YOUTUBE_CHANNEL_ID_28 = "PL6FytxeqgcEga0kEGnWZhqnuXypzYtovc"
YOUTUBE_CHANNEL_ID_29 = "PLn-mouasam6zXxoyjvncM4AKph8RNBLiz"
YOUTUBE_CHANNEL_ID_30 = "PLySo2SlSHPSMlN0-AGtCSZUWiabfKeRmc"
YOUTUBE_CHANNEL_ID_31 = "PLOtXk32e_0wavcSCi9GNcFGOmAzy3WgNW"
YOUTUBE_CHANNEL_ID_32 = "PL0YGmUSvExR3pJvr-yGJjKgWzqwUXFCrX"
YOUTUBE_CHANNEL_ID_33 = "PLfTWtDD0b0GEXvYaozOACqXtVaxzuX3Ya"
YOUTUBE_CHANNEL_ID_34 = "PLw_H_ejKUfz_fgGS4n1ZBs-JYOJBSiKDG"
YOUTUBE_CHANNEL_ID_35 = "PL1CF864ACBC3FAEB4"
YOUTUBE_CHANNEL_ID_36 = "PLiMRxP_FtZmLuYKLz1hcjeVAdCLPcLmEe"

# Entry point
def run():
    plugintools.log("docu.run")
    
    # Get params
    params = plugintools.get_params()
    
    if params.get("action") is None:
        main_list(params)
    else:
        action = params.get("action")
        exec action+"(params)"
    
    plugintools.close_item_list()

# Main menu
def main_list(params):
    plugintools.log("docu.main_list "+repr(params))

    plugintools.add_item( 
        #action="", 
        title="--[COLORred]Channels[/COLOR]--",
        url="plugin://plugin.video.youtube/channel/"+YOUTUBE_CHANNEL_ID_1+"/",
        thumbnail="http://vignette2.wikia.nocookie.net/logopedia/images/f/fa/YouTube_Kids.png/revision/latest?cb=20150220135053",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="LittleBabyBum - [COLORyellow]Nursery Rhymes[/COLOR]",
        url="plugin://plugin.video.youtube/channel/"+YOUTUBE_CHANNEL_ID_2+"/",
        thumbnail="https://yt3.ggpht.com/-KLfbkE3zovQ/AAAAAAAAAAI/AAAAAAAAAAA/gMZ_6qxvEXw/s900-c-k-no-rj-c0xffffff/photo.jpg",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="The Diamond Minecart - [COLORgreen]MINECRAFT[/COLOR]",
        url="plugin://plugin.video.youtube/channel/"+YOUTUBE_CHANNEL_ID_3+"/",
        thumbnail="https://yt3.ggpht.com/-KEJYjuwz0-c/AAAAAAAAAAI/AAAAAAAAAAA/ScEc76PWvak/s900-c-k-no-rj-c0xffffff/photo.jpg",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Fun Toyz Collector",
        url="plugin://plugin.video.youtube/channel/"+YOUTUBE_CHANNEL_ID_4+"/",
        thumbnail="https://yt3.ggpht.com/-sSB36cFW0N4/AAAAAAAAAAI/AAAAAAAAAAA/4XxC7rLRwKo/s900-c-k-no-rj-c0xffffff/photo.jpg",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Toy Trains 4 U",
        url="plugin://plugin.video.youtube/channel/"+YOUTUBE_CHANNEL_ID_5+"/",
        thumbnail="https://i.ytimg.com/vi/icQkHFQCY3I/maxresdefault.jpg",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Ryans Toy Reviews",
        url="plugin://plugin.video.youtube/channel/"+YOUTUBE_CHANNEL_ID_6+"/",
        thumbnail="https://pbs.twimg.com/profile_images/579801246132924417/EJYvTl_I.jpg",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Leokim",
        url="plugin://plugin.video.youtube/channel/"+YOUTUBE_CHANNEL_ID_7+"/",
        thumbnail="http://img.youtube.com/vi/WPXjFIXwowA/0.jpg",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Stampy Longhead - [COLORgreen]MINECRAFT[/COLOR]",
        url="plugin://plugin.video.youtube/channel/"+YOUTUBE_CHANNEL_ID_8+"/",
        thumbnail="https://yt3.ggpht.com/-bY_OkstVA0g/AAAAAAAAAAI/AAAAAAAAAAA/x2CqwQ35Dco/s900-c-k-no-rj-c0xffffff/photo.jpg",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Ali-A - [COLORgreen]MINECRAFT[/COLOR]",
        url="plugin://plugin.video.youtube/channel/"+YOUTUBE_CHANNEL_ID_9+"/",
        thumbnail="http://image3.redbull.com/rbcom/010/2014-10-06/1331683000265_2/0010/1/1500/1000/2/ali-a-youtube.jpg",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="--[COLORred]Playlists[/COLOR]--",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_10+"/",
        thumbnail="http://vignette2.wikia.nocookie.net/logopedia/images/f/fa/YouTube_Kids.png/revision/latest?cb=20150220135053",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Funny Bones",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_11+"/",
        thumbnail="http://cdn.iofferphoto.com/img3/item/575/396/496/o_funnybones-animated-uk-cartoon-series-all-12-episodes-7921.jpg",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Peppa Pig",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_12+"/",
        thumbnail="http://orig07.deviantart.net/073a/f/2016/134/1/2/peppa_pig_png_pack__revised_and_expanded__by_kaylor2013-da2fl4l.png",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Random Cartoons",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_13+"/",
        thumbnail="http://upload.wikimedia.org/wikipedia/fr/1/1b/Looney_Tunes_logo.png",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Bob The Builder",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_14+"/",
        thumbnail="http://www.cuddlycollectibles.com/Backgrounds/image/nick_jr/bob_the_builder2.png",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Tom and Jerry",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_15+"/",
        thumbnail="http://2.bp.blogspot.com/_V3ZcDd2Hrlo/TSxHKCXBi4I/AAAAAAAAAS4/KivUE5jml0M/s1600/4rpd39.jpg.png",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Roadrunner",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_16+"/",
        thumbnail="http://vignette1.wikia.nocookie.net/space-jam/images/1/14/Runner.png/revision/latest?cb=20140211075159",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="DangerMouse",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_17+"/",
        thumbnail="http://icons.iconseeker.com/png/fullsize/danger-mouse/danger-mouse.png",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Top Cat",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_18+"/",
        thumbnail="http://top-cat-characters.clipartonline.net/_/rsrc/1339433291059/top-cat-characters-page-3/TopCat-Characters-03.png?height=300&width=400",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Magic Roundabout",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_19+"/",
        thumbnail="http://cdn.robbiewilliams.com/sites/default/files/styles/full-photo/public/magicroundabout.png?itok=4BEug-rK",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Meg and Mog",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_20+"/",
        thumbnail="http://idata.over-blog.com/2/61/59/27/HALLOWEEN/Meg01bis.PNG",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Come Outside (Pippin)",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_21+"/",
        thumbnail="http://showbizgeek.com/wp-content/uploads/2013/07/Screen-Shot-2013-07-24-at-20.06.11.png",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Recess",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_22+"/",
        thumbnail="http://4.bp.blogspot.com/-JHWvBlsl3VM/Va58aNcP-wI/AAAAAAAA53I/w2_qFJeVASY/s1600/TJ.png",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Arthur",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_23+"/",
        thumbnail="http://vignette1.wikia.nocookie.net/arthur/images/2/25/Arthur_2.png/revision/latest?cb=20130118044954",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Thundercats",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_24+"/",
        thumbnail="http://vignette3.wikia.nocookie.net/thundercats/images/1/1f/Thundercats_symbol_by_machsabre-d4233bc.png/revision/latest?cb=20120203191342",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="The Real Ghostbusters",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_25+"/",
        thumbnail="http://vignette3.wikia.nocookie.net/leverage/images/4/4a/220px-Ghostbusters_logo.svg.png/revision/latest?cb=20120214180404",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Care Bears",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_26+"/",
        thumbnail="http://2.bp.blogspot.com/-MFPQYOeD-mo/Ukhdign8v4I/AAAAAAAAVqE/XwpEcsEHYU8/s1600/carebear2.png",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Count Duckula",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_27+"/",
        thumbnail="http://vignette3.wikia.nocookie.net/vampires/images/b/bc/Count_Duckula.png/revision/latest?cb=20140712213525",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Duck Tales",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_28+"/",
        thumbnail="http://vignette4.wikia.nocookie.net/disney/images/f/f4/Scrooge-mcduck_ducktales_remastered.png/revision/latest?cb=20150507152131",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Superted",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_29+"/",
        thumbnail="http://vignette4.wikia.nocookie.net/the-adventures-of-the-gladiators-of-cybertron/images/8/8f/SuperTed.png/revision/latest?cb=20140724172823",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Captain N  -  Game Master",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_30+"/",
        thumbnail="http://zeldawiki.org/images/thumb/7/7b/Captain_N_The_Game_Master.png/300px-Captain_N_The_Game_Master.png",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="70's and 80's",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_31+"/",
        thumbnail="http://eq2wire.com/wp-content/uploads/2015/02/capt-caveman.png",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Clangers",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_32+"/",
        thumbnail="http://ichef.bbci.co.uk/childrens-responsive-ichef/r/400/1x/cbeebies/clangers_atoz_image.png",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Wallace and Gromit",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_33+"/",
        thumbnail="http://www.widebeamdigital.com/wp-content/uploads/2011/12/chato-for-site-300x300.png",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Fraggle Rock",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_34+"/",
        thumbnail="http://vignette3.wikia.nocookie.net/logopedia/images/6/60/FraggleRockLogo2.png/revision/latest?cb=20120131033716",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Morph",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_35+"/",
        thumbnail="https://upload.wikimedia.org/wikipedia/en/e/ec/Morph-NMM-Bradford.jpg",
        folder=True )
    plugintools.add_item( 
        #action="", 
        title="Thunderbirds",
        url="plugin://plugin.video.youtube/playlist/"+YOUTUBE_CHANNEL_ID_36+"/",
        thumbnail="http://static.tvtropes.org/pmwiki/pub/images/Thunderbirds.jpg",
        folder=True )
run() 