Plugin Creation Help
#1
Hey guys,

I'm sorry to post here, adding the same thing again. I previously posted in the Plugin/Script (Python) Help and Support Forum but I guess it was the wrong place.

I've been trying to learn to make plugins, following Voinages tutorial, and have had a fair bit of success with it, managing to get YouTube working (I know it's been done, but it was to learn). Theres a couple of things that aren't explained in the tutorial though which I've been unable to find any further information on.

I'm using the default.py as a basis, but I don't understand what defines the actual function performed when selecting a file. When i click it automatically plays the file, but I'd like to get it to run a different defined function instead - can anyone give me any pointers?
Reply
#2
From the tutorial:
Code:
if mode==None or url==None or len(url)<1:
        print ""
        CATEGORIES()
    
elif mode==1:
        print ""+url
        INDEX(url)
        
elif mode==2:
        print ""+url
        VIDEOLINKS(url,name)
Quote:We have 3 modes here, but, you can have as many as you need.

* mode0 = CATEGORIES()

* mode1= INDEX(url,name)

* mode2=VIDEOLINKS(url,name)

So in the CATEGORIES () : function, we call addDir(‘’,’’,1,’’Wink which tells the plugin to move on to mode 1 = INDEX(url).

The modes define what function is used. So if you want to change automatic play behavior, create/use a new function and mode.
Reply
#3
stacked Wrote:From the tutorial:

The modes define what function is used. So if you want to change automatic play behavior, create/use a new function and mode.

Cheers man. I actually have modded those and never figured that out. Stupid. Cheers man.
Reply

Logout Mark Read Team Forum Stats Members Help
Plugin Creation Help0