Mediasite Plugin For MediaPortal (1 Viewer)

morpheus_xx

Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,400
    6,971
    Germany Germany
    Country flag
    Next steps:
    Change WorkflowState definitions from "hello world" to "Mediasitexxx":
    <Register Location="/Workflow/States">
    <WorkflowState Id="23DB4E53-EB0D-4315-9F4C-F5E1C13577C7"
    Name="MediasiteMain" MainScreen="MediasiteMainscreen"
    DisplayLabel="[Mediasite.StateDisplayLabel]"/> <!-- No workflow model -->
    </Register>
    Change menu actions (/skin/default/workflow):
    <PushNavigationTransition Id="EA48BD6E-60D3-45b2-9C35-1AB437CC72FB"
    Name="Home->MediaSite"
    DisplayCategory="m-MediaSite"
    SortOrder="a"
    SourceStates="7F702D9C-F2DD-42da-9ED8-0BA92F07787F"
    TargetState="23DB4E53-EB0D-4315-9F4C-F5E1C13577C7"
    DisplayTitle="[MediaSite.MenuEntry]"/>
    </MenuActions>
    Watch for red marked Guids, the targetstate is your workflow state from plugin.xml (and the associated screen)
    Inside the "hello_world.xaml" there is a reference to the model:
    <DockPanel Context="{Model Id=E8585B55-22B4-4E79-9D3B-AA41FAF88355}" LastChildFill="False">
    The ID is the one you gave to the MediasitePlugin model (public const string MODEL_ID_STR = "E8585B55-22B4-4E79-9D3B-AA41FAF88355";)
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,400
    6,971
    Germany Germany
    Country flag
    Small next thing: Your current model registration uses wrong class name. There is one "Mediasite" too much in code:

    It should be this way:
    namespace MediasitePlugin { public class MediasitePlugin { } }

    to match:
    <Register Location="/Models">
    <Model Id="E8585B55-22B4-4E79-9D3B-AA41FAF88355" ClassName="MediasitePlugin.MediasitePlugin"/>
    </Register>
    Once the mentioned steps are taken, you can get to data retrieval part already: the model will load and now needs to be coded further:
    [2013-03-15 19:28:30,215] [44451 ] [InputMgr ] [ERROR] - PluginManager: Error building plugin item 'E8585B55-22B4-4E79-9D3B-AA41FAF88355' at location '/Models'
    System.Reflection.TargetInvocationException: --> System.Exception: Public/Private Key Mismatch: Check the Public/Private Key Entries & the Endpoint URL
    bei MediasiteAPIConnector.APIAuthenticator..ctor(String Endpoint, String publicKey, String privateKey)
    bei MediasitePlugin.MediasitePlugin..ctor()
    edit:
    inside plugins.xml you should also add required assemblies, so your plugin's types will find all dependencies:
    <Runtime>
    <Assembly FileName="MediasitePlugin.dll"/>
    <Assembly FileName="MediasiteAPIConnector.dll"/>
    <Assembly FileName="EDAS60.Client.dll"/>
    </Runtime>
     
    Last edited:

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,400
    6,971
    Germany Germany
    Country flag
    good progress. you also should have a new entry in main menu [Mediasite.menuentry] (language files will be considered later).

    If you check the log (either under ProgramData\Team MediaPortal\MP2-Client\Log or in output window of VS) you will see:
    [2013-03-15 21:01:47,125] [16061 ] [InputMgr ] [INFO ] - PluginManager: Plugin 'MediasitePlugin' (id '1360d7c7-6936-4c9a-9352-d46830c09c0a') activated.
    [2013-03-15 21:01:47,172] [16108 ] [InputMgr ] [ERROR] - PluginManager: Error building plugin item 'E8585B55-22B4-4E79-9D3B-AA41FAF88355' at location '/Models'
    System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht. ---> System.Exception: Public/Private Key Mismatch: Check the Public/Private Key Entries & the Endpoint URL
    This means you should now check the model initialization, especially the API part.

    When the screen is to be shown, the model get's instantiated, this currently fails in CTOR already.
     

    Vic Demented

    Retired Team Member
  • Premium Supporter
  • March 4, 2013
    42
    25
    49
    Brugge, Belgium
    United States of America United States of America
    That's the thing...I don't see that in the logs. My ClientError log is empty and I can't find a reference to 1360d7c7-6936-4c9a-9352-d46830c09c0a in the ClientLog....
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,400
    6,971
    Germany Germany
    Country flag
    your are right, I overseen some minor parts:
    • in solution, make sure you enable plugin for build (after x86 change)
    • when "Hello World Plugin" is also enabled, it will cause conflict.
      [2013-03-15 21:50:29,330] [10582 ] [Main ] [ERROR] - Error loading workflow resource file 'D:\Coding\MP\MP2\MP2_git\MediaPortal-2-VicDemented\MediaPortal\Bin\MP2-Client\bin\x86\Debug\Plugins\MediasitePlugin\Skin\default\workflow\Mediasite-actions.xml'
      System.ArgumentException: A menu action with id 'ea48bd6e-60d3-45b2-9c35-1ab437cc72fb' was already registered with action name 'Home->HelloWorld' (name of duplicate action is 'Home->MediaSite') -> Forgot to create a new GUID?
      bei MediaPortal.UI.Services.Workflow.WorkflowResourcesLoader.LoadWorkflowResourceFile(String filePath) in D:\Coding\MP\MP2\MP2_git\MediaPortal-2-VicDemented\MediaPortal\Source\Core\MediaPortal.UI\Services\Workflow\WorkflowResourcesLoader.cs:Zeile 117.
      --> solution: give the <PushNavigationTransition a new guid.
    • Rename all "helloworld...xml/xaml" to Mediasite (Mediasite-actions.xml; MediasiteMainscreen.xaml) and double-check if the xaml-name matches to definition in workflow (<WorkflowState Id="23DB4E53-EB0D-4315-9F4C-F5E1C13577C7"
      Name="MediasiteMain" MainScreen="MediasiteMainscreen")
     

    Vic Demented

    Retired Team Member
  • Premium Supporter
  • March 4, 2013
    42
    25
    49
    Brugge, Belgium
    United States of America United States of America
    I did a clean / rebuild of the entire solution and I don't see those errors in the Logs or in VS output window during debug.

    I do see a few of these however:
    A first chance exception of type 'System.Xml.XmlException' occurred in System.Xml.dll

    I am assuming this is due to something I have done in one of the XML files, but I don't see it, and since the plugin doesn't show up on the main screen, I can't launch it so my breakpoints will fire.
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,400
    6,971
    Germany Germany
    Country flag
    if it is ok for you, commit / push your current version and I update it with my local changes. I also moved some code lines in plugin, so it won't throw issues in CTOR
     

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

    OP Similar threads Forum Replies Date
    joecrow 1.25.0 Radio Time plugin fails after Resume from Sleep with MP 1.25 Bugreports 4
    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 4
    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
    emphatic Pictures in the cloud - would a plugin be possible for services like Google Photos MediaPortal 1 Plugins 1
    C where is the Online Videos plugin General Support 1
    Similar threads

























    Top Bottom