Wrote my first addon but.....
#1
I wrote my first Kodi video add on and everything works wonderfully. It navigates all the pages of the website it scrapes
finds all the videos etc. My issue is that the site doesn't let you play videos if you don't check a file called ad-preroll.html
first before playing a video. I have my add on check the link every time it generates a directory (listing of videos) so
everything works fine unless I use the play from here option where it plays videos one after another.

It will play a number of videos and then fail until I backspace to the previous pages then next again and start again
so the add on checks ad-preroll.html again. Is there a way I can set a command to run before the player
starts playing for example:

Code:
adspage = 'http://www.site.net/ad-preroll.html'
html = opener.open(adspage).read()
Reply
#2
I'm guessing that you're using the resolved url in the listitem.
perhaps try using a url that calls your addon with the resolved url as a parameter in the listitem.
it would typically look like this: plugin://your.plugin.name?mode=play&url=http://site.com/v/asd234p2_.mp4

then load the ad html before playing the video.

that way the "play from here" will load the ad html everytime before a video is played.

EDIT: I did some testing with "Play from here" it only plays the first video and ignore s the rest. I don't think the approach I recommended will work.
Reply
#3
Thanks for the help I got it fixed you where right. I had to set the isFolder to false and it worked. woohoo 100% functional now
Reply
#4
Nevermind yeah play from here is acting funny

EDIT:

I think I'll try using isFolder=True and add my own context menu and see if I can get it to do what I want

EDIT AGAIN:

I was able to fix the issue by using your idea and using set resolved url
Reply

Logout Mark Read Team Forum Stats Members Help
Wrote my first addon but.....0