• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create Your First Addon
#11
(04-23-2015, 09:03 AM)whufclee Wrote: The guys at the official kodi.tv forum have created an excellent guide on how to create your very first basic addon, even if you already have previous coding experience this is a great place to start as it will guide you through the basics of how Kodi works and explains the dependencies that are needed when creating an addon.

The wiki guide is here.

There is an official forum thread on the kodi.tv website where you'll get the best support possible but of course you can ask questions in here if you prefer. You can visit the official support thread here.

WHUFCLEE,
I am trying to follow the NaN video guides for creating my first addon. I can not seem to get any of my code that I am following along with you on into kodi to be able to test run it. Please help me get my code into Kodi. Maybe we could do a tutorial on what we have to do to incorporate our add on into kodi?
#12
I think I solved the problem of getting my addon into Kodi. Now the problem I have is an error in my code. Here is my code.

#Import Modules
#These import modules are required to run this addon

import xbmc,xbmcgui,xbmcplugin
import os,sys

# Global Variables
# Variables assign diffrent values to diffrent items.


player=xbmc.player()
video='https://archive.org/download/babies_and_breadwinners_2/babies_and_breadwinners_2_512kb.mp4'
trailer='https://archive.org/download/babies_and_breadwinners_2/babies_and_breadwinners_2_512kb.mp4'

##########################################
# Initialize Plugin directory structure
addon_handle = int(sys.argv[1])
##########################################

# xbmcplugin.setContent(addon_handle, 'movies')

li = xbmcgui.ListItem('Video', iconImage='DefaultVideo.png')
xbmcplugin.addDirectoryItem(handle=addon_handle, url=video, listitem=li)

li = xbmcgui.ListItem('Trailer', iconImage='DefaultVideo.png')
xbmcplugin.addDirectoryItem(handle=addon_handle, url=trailer, listitem=li)

#######################################
#Close directory structure
xbmcplugin.endOfDirectory(addon_handle)
#######################################

Do you see the error?
#13
Sorry I've been at a family party and had a few beers today so I'm not going to be at my finest at debugging, especially as you've not supplied a log to look at. That being said I can see straight off that you've got a typo in there...

this: player=xbmc.player()
should be: player=xbmc.Player()

All python code is case sensitive.

Also it looks like you're using the old guide from season 1 of Python Koding. I would highly recommend using the Python Koding framework instead (see the latest video released yesterday).

Basically we started the Python Koding videos and after season 1 I realised there's a whole lot of stuff that could be made so much easier so I spent the past few months creating this framework to help up and coming devs. For generic Python ideas season 1 will give you a good start but it's probably easier to just start with the new Python Koding framework as season 1 covers loads of stuff which is no longer needed as I've done it all for you in the framework so it's easy to call upon Smile

Season 2 will be starting soon but yesterdays video is definitely the one I'd recommend watching before anything else.
IMPORTANT:
NO LOG == NO PROBLEM
#14
(05-07-2017, 06:26 PM)whufclee Wrote: Sorry I've been at a family party and had a few beers today so I'm not going to be at my finest at debugging, especially as you've not supplied a log to look at. That being said I can see straight off that you've got a typo in there...

this: player=xbmc.player()
should be: player=xbmc.Player()

All python code is case sensitive.

Also it looks like you're using the old guide from season 1 of Python Koding. I would highly recommend using the Python Koding framework instead (see the latest video released yesterday).

Basically we started the Python Koding videos and after season 1 I realised there's a whole lot of stuff that could be made so much easier so I spent the past few months creating this framework to help up and coming devs. For generic Python ideas season 1 will give you a good start but it's probably easier to just start with the new Python Koding framework as season 1 covers loads of stuff which is no longer needed as I've done it all for you in the framework so it's easy to call upon Smile

Season 2 will be starting soon but yesterdays video is definitely the one I'd recommend watching before anything else.

Thanks for the answer and your support. I am using the videos that are within Kodi. Where are the framework vidoes?
#15
Below is the special one we done yesterday, season 2 will go into the Python Koding framework more and we'll create an add-on based on a popular website - this will be taking place in the coming weeks.





You can view the documentation, runcode examples and video guides for various functions from within the template add-on (details in that video above) but if you want you can view some of them on the YouTube playlist here: https://www.youtube.com/playlist?list=PL...Sp3bLvE_tW

Make sure you start by following the video above though before anything else.
IMPORTANT:
NO LOG == NO PROBLEM
#16
I'm having a problem with "invalid structure" 

I know it's related to using a mac but i can't figure out how to fix it....anyone have this issue?
#17
(05-07-2017, 08:59 PM)whufclee Wrote: Below is the special one we done yesterday, season 2 will go into the Python Koding framework more and we'll create an add-on based on a popular website - this will be taking place in the coming weeks.





You can view the documentation, runcode examples and video guides for various functions from within the template add-on (details in that video above) but if you want you can view some of them on the YouTube playlist here: https://www.youtube.com/playlist?list=PL...Sp3bLvE_tW

Make sure you start by following the video above though before anything else.

Thank you. A great help you have been and I do want you to know I appreciate it and I look forward to working with you as my skill set increase and I can actually call myself a dev. That is where I hope to be in the near future.
#18
I have now closed this thread, please use the new thread dedicated Python Koding support thread for any questions. Thank you.
IMPORTANT:
NO LOG == NO PROBLEM


Possibly Related Threads...
Thread Author Replies Views Last Post
  Create my own repository/wizard help DJH21 2 438 10-29-2017, 05:58 AM
Last Post: Berl
  Scraper addon Universe addon 1 50 10-14-2017, 07:14 AM
Last Post: whufclee
  Live TV addon TonyH 10 129 09-26-2017, 08:45 AM
Last Post: whufclee
  error when trying to open addon keepforgettingmypassword 5 34 09-20-2017, 02:26 PM
Last Post: keepforgettingmypassword
  creating a search feature in addon streemz 10 80 09-04-2017, 07:50 PM
Last Post: streemz
  how can i import pyqt4 in my addon naveengautam002 1 12 08-15-2017, 10:55 AM
Last Post: whufclee
  Create Your Own Repository whufclee 55 14,255 08-10-2017, 09:21 PM
Last Post: TonyH
  installing scripts required for addon BigYid 5 39 08-05-2017, 11:51 AM
Last Post: whufclee
  How to submit an addon to the Add-on Portal whufclee 11 2,903 08-04-2017, 10:44 PM
Last Post: BigYid
  Create Repo / Addon for " TV MUCHO" bicky 2 29 07-28-2017, 05:37 PM
Last Post: bicky

Forum Jump:


Users browsing this thread: 1 Guest(s)