Mediasite Plugin For MediaPortal (1 Viewer)

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
    The browse screen now only lists the title of presentation, if there is also a thumbnail url we could use it. The layout could also be a "grid", not only a list.

    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:

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Do you mean a grid like the television lineup grid? That would be cool for a "What's Playing Today" type screen.
    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...

    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.
    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.
     

    morpheus_xx

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

    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
    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 :(
     

    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
    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).

    XML:
    <?xml version="1.0" encoding="utf-8" ?>
    <Categories>
      <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"/>
      <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" />
      <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" />
    </Categories>

    Next I created a new struct that holds the presentationdetails[] as well as the new attributes from the XML:

    Code:
     public struct CategoryCollection
      {
    	public string CategoryName;
    	public string IconPath;
    	public string BannerPath;
    	public PresentationDetails[] Presentations;
     
      }

    Next I created a new Load method that loads the Collection based on the categories stored in the XML.

    Code:
     /// <summary>
    	/// Populates object with array of presentations where the value of the key "CategoryName" = value
    	/// </summary>
    	public void LoadCategoryCollection()
    	{
    	  XPathDocument document = new XPathDocument(@"Plugins\mediasitePlugin\CategoryDefinition.xml");
    	  XPathNavigator navigator = document.CreateNavigator();
    	  XPathNodeIterator nodes = navigator.Select("/Categories/Category");
     
    	  foreach (XPathNavigator item in nodes)
    	  {
    		var _name = item.GetAttribute("Name", "");
    		var _iconPath = item.GetAttribute("IconPath", "");
    		var _bannerPath = item.GetAttribute("BannerPath", "");
     
    		CategoryCollection _collection = new CategoryCollection();
    		_collection.CategoryName = _name;
    		_collection.IconPath = _iconPath;
    		_collection.BannerPath = _bannerPath;
     
    		var _pResponse = _client.QueryMediasiteKeyValuesByCriteria(new QueryMediasiteKeyValuesByCriteriaRequest() { Key = "CategoryName", Value = _collection.CategoryName, Ticket = _requestTicket, ApplicationName = _applicationName });
     
    		List<PresentationDetails> _tPresList = new List<PresentationDetails>();
    		if (_pResponse.KeyValues.Length > 0)
    		{
    		  string[] pIDList = new string[_pResponse.KeyValues.Length];
     
    		  for (int i = 0; i < _pResponse.KeyValues.Length; i++)
    		  {
    			pIDList[i] = _pResponse.KeyValues[i].Id;
    		  }
    		  var tpresentations = _client.QueryPresentationsById(new QueryPresentationsByIdRequest() { PresentationIdList = pIDList, ApplicationName = _applicationName, Ticket = _requestTicket, IncludeKeyValues = true });
    		  if (tpresentations.Presentations != null)
    		  {
    			foreach (PresentationDetails _pres in tpresentations.Presentations)
    			{
    			  _pres.VideoUrl = _pres.VideoUrl.Replace("$$NAME$$", GetMP4Content(_pres.Content).FileNameWithExtension).Replace("$$PBT$$", CreateAuthTicket(_pres.Id)).Replace("$$SITE$$", _sofoSite);
    			}
     
     
    			_collection.Presentations = tpresentations.Presentations;
    			_categories.Add(_collection);
    		  }
     
    		}
    	  }
    	}

    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:

    Users who are viewing this thread

    Top Bottom