JSON Interface (1 Viewer)

P4G0

Portal Pro
December 8, 2009
114
12
Home Country
Germany Germany
Hey guys,

I want to develop a JSON Interface for the MediaPortal TV Server. It should be able to start streams, manage records and list epg-data.

Currently the plugin only shows up in the plugin section of the TV Server, but it doesn't work like expected.

Is it right, to start my service in the Start-Method of the class which implements ITvServerPlugin?
How can I test, if my plugin gets started?

You can view my current sourcecode here.

- Plugin.cs implements the ITvService-Interface
- The JSONService.cs runs the network service
- Setup.cs is the GUI to configure the Plugin in TV Server Administration

I have tested my JSONService as a single Console-Application and it worked fine. But as a TV Server-Plugin it doesn't start the Network-Service.

I would be thankful for any help.

P.S.: Does anybody know a small and easy JSON-Library for C#?
 

KayDiefenthal

MP Donator
  • Premium Supporter
  • July 18, 2006
    1,176
    92
    46
    Germany - Bonn
    Home Country
    Germany Germany
    AW: JSON Interface

    hmm

    i think this is missing

    in Setup.cs
    public Setup()
    : this("")
    {
    }

    public Setup(String name)
    : base(name)
    {
    InitializeComponent();
    }



    public override void OnSectionDeActivated()
    {
    base.OnSectionDeActivated();
    }

    public override void OnSectionActivated()
    {
    base.OnSectionActivated();

    }
     

    P4G0

    Portal Pro
    December 8, 2009
    114
    12
    Home Country
    Germany Germany
    What does

    Code:
    public Setup() [COLOR="Red"]: this("")[/COLOR]
    {
    }

    and

    Code:
    public Setup(String name) [COLOR="Red"]: base(name)[/COLOR]
    {
       InitializeComponent();
    }
    mean?

    I'm new to C#, come from Java :)
     

    KayDiefenthal

    MP Donator
  • Premium Supporter
  • July 18, 2006
    1,176
    92
    46
    Germany - Bonn
    Home Country
    Germany Germany
    AW: Re: JSON Interface

    What does

    Code:
    public Setup() [COLOR="Red"]: this("")[/COLOR]
    {
    }

    and

    Code:
    public Setup(String name) [COLOR="Red"]: base(name)[/COLOR]
    {
       InitializeComponent();
    }
    mean?

    I'm new to C#, come from Java :)

    your plugin.cs has this property
    public string Name
    {
    get { return "JSON Interface"; }
    }
    this property "Name" see you in the aviable pluginlist section
    setup.cs = (Usercontroll)

    have on top an gardient Label that should be view the Property "Name" too

    and for that need you this constructors
     

    cheezey

    Community Plugin Dev
    August 26, 2004
    1,560
    312
    55
    West Yorks, UK
    Home Country
    United Kingdom United Kingdom
    I think there is already a TV Server JSON interface, look for the TV4Home plugin.


    Sent from my iPhone using Tapatalk
     

    P4G0

    Portal Pro
    December 8, 2009
    114
    12
    Home Country
    Germany Germany
    Hmm ok, I will try :)
     

    Users who are viewing this thread

    Top Bottom