Mediasite Plugin For MediaPortal | Page 6

Discussion in 'Plugin Development' started by Vic Demented, March 11, 2013.

  1. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    11,017
    Likes Received:
    4,750
    Ratings:
    +6,796 / 11
    Home Country:
    Germany Germany
    Show System Specs
    Pushed it. Will be back in a week.


     
    • Like Like x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Vic Demented
    • Premium Supporter

    Vic Demented Retired Team Member

    Joined:
    March 4, 2013
    Messages:
    42
    Likes Received:
    25
    Gender:
    Male
    Location:
    Brugge, Belgium
    Ratings:
    +25 / 0
    Home Country:
    United States of America United States of America
    Do you mean a grid like the television lineup grid? That would be cool for a "What's Playing Today" type screen. But we definitely need filtering (Folder Name, Date Range, Tags, Presenter) and a search page that would allow the user to search for a presentation name.

    Did you see this question @morpheus_xx ??
     
    Last edited: April 9, 2013
  4. kiwijunglist
    • Team MediaPortal

    kiwijunglist Super Moderator

    Joined:
    June 10, 2008
    Messages:
    6,742
    Likes Received:
    1,417
    Occupation:
    Doctor
    Location:
    New Zealand
    Ratings:
    +1,846 / 9
    Home Country:
    New Zealand New Zealand
    Show System Specs
    This is a really cool idea :) Also welcome to the team.
     
  5. Vic Demented
    • Premium Supporter

    Vic Demented Retired Team Member

    Joined:
    March 4, 2013
    Messages:
    42
    Likes Received:
    25
    Gender:
    Male
    Location:
    Brugge, Belgium
    Ratings:
    +25 / 0
    Home Country:
    United States of America United States of America
    Thank you sir.
     
  6. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    11,017
    Likes Received:
    4,750
    Ratings:
    +6,796 / 11
    Home Country:
    Germany Germany
    Show System Specs
    When I wrote this I mainly thought of item presentation, instead of using a ListView based on StackPanel, we could use a WrapPanel. This is how the media browsing works when you switch layout from list to "grid" (n x m items).

    But I like the idea of tv lineup grid. In SlimTV I have implemented a basic EPG, using existing controls. But unfortunately it's not yet as user-friendly as in MP1. So if we have a better solution, both parts could profit of this. But it will surely take a long time...

    Yes, we need all of them. If you add the required searching features to you API, I can create the GUI screens for them. I would do it similar to Media views, adding filter/sort options to menu.
     
  7. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    11,017
    Likes Received:
    4,750
    Ratings:
    +6,796 / 11
    Home Country:
    Germany Germany
    Show System Specs
    Vic, another question:
    As there seems to exists multiple sites that take use of MediaSite, don't we need a configuration section? So users can add their server/login credentials a.s.o.

    @Lehmden pointed in his german thread (https://forum.team-mediaportal.com/threads/plugin-vorstellung-mediasite.118192/) to a german example of an university that also seem to use the service: http://www.med.uni-magdeburg.de/mediasite.html

    Do you know if this site would be compatible as well? Were there special changes required for your API access?
     
    • Like Like x 2
  8. Vic Demented
    • Premium Supporter

    Vic Demented Retired Team Member

    Joined:
    March 4, 2013
    Messages:
    42
    Likes Received:
    25
    Gender:
    Male
    Location:
    Brugge, Belgium
    Ratings:
    +25 / 0
    Home Country:
    United States of America United States of America
    Yea, there are many universities in Europe that use Mediasite. In Holland, the University of Amsterdam, Erasmus, and Delft all use Mediasite quite extensively. So the answer to your question is Yes. We will need to provide (at some point) the capability for someone to put in their credentials. However for this demo/presentation, I wanted to just focus on the eye candy.

    I apologize for the 'radio silence' lately, but I am really swamped as the conference date approaches. I have to complete my Google Calendar Sync Tool, and an LMS integrated player and custom player design tool before the end of next week...so it looks like you are on your own this week :(
     
  9. Vic Demented
    • Premium Supporter

    Vic Demented Retired Team Member

    Joined:
    March 4, 2013
    Messages:
    42
    Likes Received:
    25
    Gender:
    Male
    Location:
    Brugge, Belgium
    Ratings:
    +25 / 0
    Home Country:
    United States of America United States of America
    Ok @morpheus_xx here are my latest changes:

    Fist, I added a new XML document to store the category definitions (I am sure this will change once we give the users the ability to create these categories via the UI).

    Code (XML):
    1. <?xml version="1.0" encoding="utf-8" ?>
    2. <Categories>
    3.   <Category Name="Math" IconPath="http://files.softicons.com/download/system-icons/windows-8-metro-icons-by-dakirby309/png/512x512/Applications/Calculator.png" BannerPath="http://www.math.siu.edu/Images/chalkboardheader.jpg" KeyWord="Math"/>
    4.   <Category Name="Physics" IconPath="http://www.engr.ku.edu/departments/dept_icons/physx_icon_sm.png" BannerPath="http://www.science.uq.edu.au/images/careers/header-physics.jpg" KeyWord="Physics" />
    5.   <Category Name="Chemistry" IconPath="http://cyfallshs.com/wp-content/uploads/119768-matte-grey-square-icon-signs-love-potion.png" BannerPath="http://www.oliveoilsource.com/files/category_pictures/Olive_Chem_header.jpg" KeyWord="Chemistry" />
    6. </Categories>
    Next I created a new struct that holds the presentationdetails[] as well as the new attributes from the XML:

    Code (C):
    1.  public struct CategoryCollection
    2.   {
    3.     public string CategoryName;
    4.     public string IconPath;
    5.     public string BannerPath;
    6.     public PresentationDetails[] Presentations;
    7.  
    8.   }
    Next I created a new Load method that loads the Collection based on the categories stored in the XML.

    Code (C):
    1.  /// <summary>
    2.     /// Populates object with array of presentations where the value of the key "CategoryName" = value
    3.     /// </summary>
    4.     public void LoadCategoryCollection()
    5.     {
    6.       XPathDocument document = new XPathDocument(@"Plugins\mediasitePlugin\CategoryDefinition.xml");
    7.       XPathNavigator navigator = document.CreateNavigator();
    8.       XPathNodeIterator nodes = navigator.Select("/Categories/Category");
    9.  
    10.       foreach (XPathNavigator item in nodes)
    11.       {
    12.         var _name = item.GetAttribute("Name", "");
    13.         var _iconPath = item.GetAttribute("IconPath", "");
    14.         var _bannerPath = item.GetAttribute("BannerPath", "");
    15.  
    16.         CategoryCollection _collection = new CategoryCollection();
    17.         _collection.CategoryName = _name;
    18.         _collection.IconPath = _iconPath;
    19.         _collection.BannerPath = _bannerPath;
    20.  
    21.         var _pResponse = _client.QueryMediasiteKeyValuesByCriteria(new QueryMediasiteKeyValuesByCriteriaRequest() { Key = "CategoryName", Value = _collection.CategoryName, Ticket = _requestTicket, ApplicationName = _applicationName });
    22.  
    23.         List<PresentationDetails> _tPresList = new List<PresentationDetails>();
    24.         if (_pResponse.KeyValues.Length > 0)
    25.         {
    26.           string[] pIDList = new string[_pResponse.KeyValues.Length];
    27.  
    28.           for (int i = 0; i < _pResponse.KeyValues.Length; i++)
    29.           {
    30.             pIDList[i] = _pResponse.KeyValues[i].Id;
    31.           }
    32.           var tpresentations = _client.QueryPresentationsById(new QueryPresentationsByIdRequest() { PresentationIdList = pIDList, ApplicationName = _applicationName, Ticket = _requestTicket, IncludeKeyValues = true });
    33.           if (tpresentations.Presentations != null)
    34.           {
    35.             foreach (PresentationDetails _pres in tpresentations.Presentations)
    36.             {
    37.               _pres.VideoUrl = _pres.VideoUrl.Replace("$$NAME$$", GetMP4Content(_pres.Content).FileNameWithExtension).Replace("$$PBT$$", CreateAuthTicket(_pres.Id)).Replace("$$SITE$$", _sofoSite);
    38.             }
    39.  
    40.  
    41.             _collection.Presentations = tpresentations.Presentations;
    42.             _categories.Add(_collection);
    43.           }
    44.  
    45.         }
    46.       }
    47.     }
    The presenter image url is accessible via the presenters array attached to the presentation object (Presentation.Presenters[0].ImageUrl). There can be more than one presenter, but you can just use the first one in the array.

    I also modified your code to call the new method, however I am sure that will change when you design the new workflow...
     
    Last edited: May 9, 2013
  10. Vic Demented
    • Premium Supporter

    Vic Demented Retired Team Member

    Joined:
    March 4, 2013
    Messages:
    42
    Likes Received:
    25
    Gender:
    Male
    Location:
    Brugge, Belgium
    Ratings:
    +25 / 0
    Home Country:
    United States of America United States of America
    Fixed the "Presenter Image" bug.
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!