how to add trailer to my addon link?
#1
Hi Everyone

I got a Kodi addon and Just need some help

How do I get watch trailer link on a video and link it to a youtube video

like some addon have on kodi

any help will be appreciated

cheers
Thomas
Reply
#2
Hi tdbnz. You don't really mention how skilled you are, which makes it harder to help.
If you already have an addon, perhaps post some relevant code Smile

I think what you want is to have the listitems that you provide also have a value that is an url pointing to a trailer?
You can probably add that before you pass the listitem to Kodi. How you handle it in the skin is up to the skin.

Or (if I understand how addon-skinning works!) take the long and hairy (and rediculus) way and add the GUI-skinning inside your addon.. But then you cut off all the experienced skinners from ever making it look good.
But if that is what you want, the Hello World example is probably a good place to start:
http://forum.kodi.tv/showthread.php?tid=209948

Did you look at the wiki about addons?
http://kodi.wiki/view/Add-on_development

If you know how to make changes/additions to the addon you have, you might find inspiration in similar addons.
If you don't want to get into the whole coding thing, perhaps talk to the guys over in the addon support section?
http://forum.kodi.tv/forumdisplay.php?fid=154

Good luck with it Smile
Reply
#3
are you asking about metahandlers?
Reply
#4
I would like to post it up but I will be caught on piracy and get banned if I am allowed to post it I will
Reply
#5
How about a rewrite of that statement.. perhaps with some more details on your question.
Reply
#6
Should be perfectly fine to use metahandlers, it is in the official repo.. it simply scrapes movie/tv metadata for queries you provide

But op's question is more direct, basically you just need to fill in the infoLabel['trailer'] when creating a list item

If you want it to launch in the official youtube addon, then you can do this:

First get the youtube video id:
Code:
trailer_id = re.match('^[^v]+v=(.{3,11}).*', meta['trailer_url'])

Then create the proper url and set it to the 'trailer' label:
Code:
meta['trailer'] = 'plugin://plugin.video.youtube/?action=play_video&videoid=%s' % trailer_id

Then apply it to your listitem:
Code:
liz.setInfo(type="Video", infoLabels=meta)

If you need more, then you can use my metahandlers script as it will do this and grab everything else for you
Reply
#7
I not that good at coding I think it going to be more of a hassle to do it any way I have tried

thanks folks
Reply

Logout Mark Read Team Forum Stats Members Help
how to add trailer to my addon link?0