- March 24, 2007
- 12,073
- 7,459
- Home Country
- Germany
- Moderator
- #51
Pushed it. Will be back in a week.
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.
Thank you sir.This is a really cool idea Also welcome to the team.
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).Do you mean a grid like the television lineup grid? That would be cool for a "What's Playing Today" type screen.
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.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.
<?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>
public struct CategoryCollection
{
public string CategoryName;
public string IconPath;
public string BannerPath;
public PresentationDetails[] Presentations;
}
/// <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);
}
}
}
}