}
}
- /// <summary>
- /// A method for getting recently played video information
- /// </summary>
- /// <returns>A recently played video information</returns>
- public MediaInformationEx GetRecentlyPlayedVideo()
- {
- var selectArguments = new SelectArguments();
- selectArguments.SortOrder = "MEDIA_LAST_PLAYED_TIME";
- selectArguments.FilterExpression = GetConditionStringForSelection();
-
- List<MediaInfo> mediaInformationList = new List<MediaInfo>();
- MediaInformationEx recentlyPlayedVideo = new MediaInformationEx();
- try
- {
- var reader = MediaHubImpl.GetInstance.MediaInfoCommand.SelectMedia(selectArguments);
-
- while (reader.Read())
- {
- mediaInformationList.Add(reader.Current);
- }
- }
- catch (Exception exception)
- {
- DbgPort.E(exception.Message);
- return recentlyPlayedVideo;
- }
-
- foreach (var mediaInformation in mediaInformationList)
- {
- recentlyPlayedVideo.MediaContentInformation = mediaInformation;
- break;
- }
-
- return recentlyPlayedVideo;
- }
-
- /// <summary>
- /// A method for setting latest played time of the media file.
- /// </summary>
- /// <param name="videoContent">A played media file</param>
- public void SetPlayedAt(MediaInformationEx videoContent)
- {
- // @TODO : CHECK POINT 170824
- // videoContent.MediaContentInformation. = DateTime.UtcNow;
- // DbgPort.D("PlayedAt : " + videoContent.MediaContentInformation.PlayedAt.ToString());
- //.Database.Update(videoContent.MediaContentInformation);
- }
-
public override void SetContentUpdatedEventListener(EventHandler listener)
{
base.ContentUpdateFinished += listener;
}
}
- // TODO : Change to MediaInformationEx
- public string RecentlyWatchedContent { get; private set; }
-
/// <summary>
/// Gets or sets the list of video group item
/// </summary>
OnPropertyChanged("SourceList");
}
- private void ReadRecentlyWatchedContent()
- {
- // TODO : Read from VideoProvider
- RecentlyWatchedContent = "Recent";
- OnPropertyChanged("RecentlyWatchedContent");
- }
-
/// <summary>
/// A method for reading video contents through VideoProvider and updating VideoList
/// </summary>
}
}
- /// <summary>
- /// A method for setting latest played time of the media file.
- /// </summary>
- /// <param name="videoContent">A played media file</param>
- public void SetPlayedAt(MediaInformationEx videoContent)
- {
- MediaHubImpl.GetInstance.VideoProviderInstance.SetPlayedAt(videoContent);
- }
-
/// <summary>
/// A method for setting the current video
/// </summary>