Plugins that add more UPNP devices to UPnPServer (1 Viewer)

McGoober

Retired Team Member
  • Premium Supporter
  • August 13, 2006
    122
    105
    Cambridge, UK
    United Kingdom United Kingdom
    I'm in the process of creating a plugin that will add a new UPNP device and device services to the MP2 server. But currently, access to the UPnPServer object in the MP2 server isn't exposed. UPnpBackendServer inherits from UPnpServer, and it's instance is held in BackendServer. My current workaround for this is to expose a getter property called UPnpServer in BackendServer and in IBackendServer to allow access whilst I develop the plugin. A simple call to ServiceRegistration.Get<IBackendServer>().UPnpServer solves my problem, but is there another, more elegant way?
     

    Albert

    MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    41
    Freiburg im Breisgau, Germany
    Germany Germany
    AW: Plugins that add more UPNP devices to UPnPServer

    Ok, I'll see what I can do to give you public access to the UPnPServer or UPnP root device. I think it will be something similar as you already did.
     

    Albert

    MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    41
    Freiburg im Breisgau, Germany
    Germany Germany
    AW: Plugins that add more UPNP devices to UPnPServer

    My current workaround for this is to expose a getter property called UPnpServer in BackendServer and in IBackendServer to allow access whilst I develop the plugin. A simple call to ServiceRegistration.Get<IBackendServer>().UPnpServer solves my problem, but is there another, more elegant way?
    That's exactly the way I will do it. I'll also expose the UPnPServer property in IFrontendServer.
    I'll do that change after I have finished my current bugfixing session, which can take maybe one or two more days.
     

    McGoober

    Retired Team Member
  • Premium Supporter
  • August 13, 2006
    122
    105
    Cambridge, UK
    United Kingdom United Kingdom
    Sweet, thanks Albert.
    Just one thing, I think there was a cut and paste error in the name of the property in IBackendServer. Should the property be called "UPnPBackendServer" rather than "UPnPFrontendServer"?
     

    Albert

    MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    41
    Freiburg im Breisgau, Germany
    Germany Germany
    AW: Re: Plugins that add more UPNP devices to UPnPServer

    Sweet, thanks Albert.
    Just one thing, I think there was a cut and paste error in the name of the property in IBackendServer. Should the property be called "UPnPBackendServer" rather than "UPnPFrontendServer"?
    :oops:

    Fixed. Thanks.
     

    Smeulf

    Retired Team Member
  • Premium Supporter
  • October 27, 2010
    672
    454
    France
    France France
    Re: AW: Re: Plugins that add more UPNP devices to UPnPServer

    Sweet, thanks Albert.
    Just one thing, I think there was a cut and paste error in the name of the property in IBackendServer. Should the property be called "UPnPBackendServer" rather than "UPnPFrontendServer"?
    :oops:

    Fixed. Thanks.
    Albert,

    After this fix, server does not build anymore :

    Services\BackendServer\BackendServer.cs(40,16): error CS0535: 'MediaPortal.Backend.Services.BackendServer.BackendServer' doesn't implement interface member 'MediaPortal.Backend.BackendServer.IBackendServer.UPnPBackendServer' [D:\Smeulf\Desktop\MP2 GIT\MediaPortal\Source\System\MediaPortal.Backend\MediaPortal.Backend.csproj]

    Cheers.
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,981
    3,703
    Stuttgart
    Germany Germany
    Country flag
    AW: Plugins that add more UPNP devices to UPnPServer

    The class BackendServer needs a rename of the property, too ;)
     

    Albert

    MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    41
    Freiburg im Breisgau, Germany
    Germany Germany
    AW: Plugins that add more UPNP devices to UPnPServer

    Strange. Off course, I also renamed the property in the implementation class. I'll take a look at it tonight.
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    E How can I add some site to Online Video Plugin ? OnlineVideos 4
    ajs 4911: Add properties support to TextColor and TextColorNoFocus MediaPortal 1 5
    joecrow 1.25.0 Radio Time plugin fails after Resume from Sleep with MP 1.25 Bugreports 3
    P MP2: US user, OTA - can NOT get SchedulesDirect plugin to work on MP1 or MP2 --> how do I get OTA schedule? General 5
    E aktuelle englische Forums Webseite von - Showtime Plugin v3 Plugins & Erweiterungen 3
    mrmojo666 [Tv Server Plugin ]Direct Show Video Control Plugin 0.0.0.1 for Hauppauge PVR cards MediaPortal 1 Plugins 0
    joecrow MultiShortcut Plugin (Uavailable) in DWHD skin General Support 58
    vapourEyes Building TV Plugin General Development (no feature request here!) 49
    Golf4 Nach Windows-Updates läuft TV-Plugin nicht mehr Allgemeines Support- und Diskussionsforum 0
    joecrow How about a Launcher plugin for MP1? MediaPortal 1 6
    D [solved] TVServer Plugin must be missing something. General Development (no feature request here!) 1
    framug Nouveau plugin XmlTvFR pour récupérer le guide télé français Kazer / ZguideTv (WebEPGfr) 11
    emphatic Allow remote control mapping of all plugins Improvement Suggestions 0
    D Where should plugins be located on hard drive? General Support 0
    D how to disengage from one version of a plugin to use another Newcomers Forum 0
    cbr954rr How to disable a pre-configured plugin? General 2
    mrmojo666 [Plugin]Marantz Control Plugin 0.0.0.2 MediaPortal 1 Plugins 2
    mrmojo666 beginner: trying to write a plugin, need help to catch event General Development (no feature request here!) 3
    framug [Rejected] Fix PowerScheduler plugin for MP2 single seat Submit: Code Patches 9
    doskabouter [Question] Stale plugins Developer Discussions 9
    M MP1 stops responding after Starting Plugins General Support 14
    Terra LAVFilter Plugin cannot be updated (MP1.23) MediaPortal 1 Plugins 10
    L Mediaportal 1.21 and Windows 10: user schedules de-activated when powerscheduler plugin is selected General Support 1
    C Can the XmlTv Plugin handle 600+ channels? General 3
    M Online Video Plugin V.2.32 keine Installtion unter MediaPortal 1.22 ? TV / Streaming 3
    Similar threads

























    Top Bottom