Mediasite Plugin For MediaPortal (1 Viewer)

morpheus_xx

Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    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

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    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

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    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
    53
    Brugge, Belgium
    Home Country
    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

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    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
    53
    Brugge, Belgium
    Home Country
    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

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    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

    Top Bottom