Newby looking for help

Hello,

 

I am a newby in Plugin Plex developpement.

I try to create some categories with your code but nothing works, someone can help me ?

 

my file : __init__.py :

 

 

 

####################################################################################################

VIDEO_PREFIX = “/video/cfg”

NAME = “Crossfit Games 2013”

ART = ‘2013-games.png’
ICON = ‘2013-games.png’

####################################################################################################

This function is initially called by the PMS framework to initialize the plugin. This includes

setting up the Plugin static instance along with the displayed artwork.

def Start():

    # Initialize the plugin
    Plugin.AddPrefixHandler(VIDEO_PREFIX, MainMenu, NAME, ICON, ART)
    Plugin.AddViewGroup(“List”, viewMode = “List”, mediaType = “items”)

    # Setup the artwork associated with the plugin
    MediaContainer.art = R(ART)
    MediaContainer.title1 = NAME
    MediaContainer.viewGroup = “List”
    DirectoryItem.thumb = R(ICON)

This main function will setup the displayed items.

@handler(’/video/cfg’, NAME)
def MainMenu():
    dir = MediaContainer(viewMode = “List”)
    dir.Append(Function(DirectoryItem(LiveMenu, “Live”)))
    return dir

def LiveMenu(sender):
    dir = MediaContainer(viewMode = “List”)

    dir.Append(Function(DirectoryItem(ChannelMenu, “Channel 1”), channel = 1))
    dir.Append(Function(DirectoryItem(ChannelMenu, “Channel 2”), channel = 2))
    dir.Append(Function(DirectoryItem(ChannelMenu, “Channel 3”), channel = 3))

    return dir

def ChannelMenu(sender, channel):
    # Return video content for specific live channel
return 0

I hope you don't mind that I split your question to a separate thread. Starting a whole new discussion in the original thread is going to be too confusing for anyone trying to follow.

That being said, let's see what we can do to help you out.

Unfortunately, while Ian's instructional blog is very well written and covers some very helpful topics, it is out of date in terms of the Plex channel code that he references. So, there is a good chance that a number of clients that you might be trying to test with as you develop will not work that code. For example, the Plex/Web client is often the first place new developers turn for testing. It is highly unlikely to work well with that code.

I would strongly suggest a read-through of the docs at dev.plexapp.com. They're not 100% complete but they are quite helpful. There are also a few very insightful blog posts by fellow Channel Developers. Well worth the read.

Then, when you have more questions, please try to include more detail in your posts than "nothing works". That is really not very helpful in troubleshooting.

Also, here is some basic templates I created with notes for channel development that might be helpful here :

http://forums.plexapp.com/index.php/topic/62610-channel-development-templates/

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.