Plugin Development - Please help (1 Viewer)

aikeru

Portal Member
March 24, 2008
14
2
Arkansas
Home Country
United States of America United States of America
Hello, I'm new to the forum although a longtime MP user and would like to take a more active role in the MP community. :)

I am trying to develop a plugin that is basically rewriting an existing open source project that accesses a popular music streaming site as a MP plugin. I'm new to developing plugins for MP, so I'm a bit confused. Please tell me if there's somewhere else I need to put this request.

My question:

I have a C# class that inherits from GUIWindow, ISetupForm, like so

Code:
public class MyPlugin : GUIWindow, ISetupForm

I've overridden init ie:
Code:
public override bool Init()
        {
            return Load(GUIGraphicsContext.Skin + @"\myplugin.xml");
        }

and several other methods but don't want to clutter this post. The constructor of my class has no code in it.
When I try to use my plugin from mediaportal it looks like it's "going into" the plugin and then immediately goes out to the menu.
I can paste more source code if anyone needs but I'm sure I am missing a method or something...
I'm new to this, so go easy on me this time :)
 

aikeru

Portal Member
March 24, 2008
14
2
Arkansas
Home Country
United States of America United States of America
If I can present my question in a more helpful way or provide better information so someone can help, please let me know!!
 

Spragleknas

Moderator
  • Team MediaPortal
  • December 21, 2005
    9,474
    1,822
    Located
    Home Country
    Norway Norway
    Hi!
    Thread moved to Development » General Development, w/link from prev. position.

    Hopefully someone will take the time to guide you.
     

    framug

    Super Moderator
  • Team MediaPortal
  • January 31, 2005
    6,057
    2,132
    South of France
    Home Country
    France France
    I am trying to develop a plugin that is basically rewriting an existing open source project that accesses a popular music streaming site as a MP plugin. I'm new to developing plugins for MP, so I'm a bit confused. Please tell me if there's somewhere else I need to put this request.
    Hello,

    Best way could be :
    1/ Take a look in the wiki, there is a sample (old but, working/worked).
    MediaPortal1_Development/PluginDevelopersGuide - MediaPortal Manual Documentation

    2/ Also please, take a look in sourceforge mp-plugin trunk, you will find many sample with working plugins there :
    SourceForge.net Repository - [mp-plugins] Index of /trunk/plugins

    Regards.
     

    DieBagger

    Retired Team Member
  • Premium Supporter
  • September 11, 2007
    2,516
    1,276
    40
    Austria
    Home Country
    Austria Austria
    you should have a look at the window id of your plugin...

    Make sure the id is the same in the xml file in the GetID property and the GetWindowId() method.
     

    aikeru

    Portal Member
    March 24, 2008
    14
    2
    Arkansas
    Home Country
    United States of America United States of America
    Thanks for the suggestions!

    My skin xml file has

    Code:
    <window>
      <id>7722</id>

    Which should match
    Code:
            public int GetWindowId()
            {
                return 7722;
            }

    So perhaps it's something else :(

    I'll have to reread that documentation and check out the SVN linked... Is there a plugin that's very basic anyone could recommend that I look at?
     

    DieBagger

    Retired Team Member
  • Premium Supporter
  • September 11, 2007
    2,516
    1,276
    40
    Austria
    Home Country
    Austria Austria
    Did you also check:

    Code:
        // With GetID it will be an window-plugin / otherwise a process-plugin
        // Enter the id number here again
         public override int GetID
        {
          get
          {
            return 7722;
          }
    
          set
          {
          }
        }


    You might find GuiControlsDemo - MediaPortal Manual Documentation useful.

    If it doesn't work, pm me the zipped solution file and I'll have a look at it...
     

    aikeru

    Portal Member
    March 24, 2008
    14
    2
    Arkansas
    Home Country
    United States of America United States of America
    Thanks very much! I don't think I have GetID on my class so I'll have to add it.

    I'll see what progress I can make after the holidays... :) So glad to have this community!
     

    Users who are viewing this thread

    Top Bottom