summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSung-jae Park <nicesj@nicesj.com>2017-09-11 13:46:49 +0900
committerSung-jae Park <nicesj@nicesj.com>2017-09-11 13:46:49 +0900
commit0708eb630654eb8e30a305c9275cc9ecbe98df76 (patch)
treeb9fd2b75eae68ca810f83893a071d4572e91dd63
parent8ad997d013a0444f5f70c754a7537bbe31e61145 (diff)
parenta9b4358cf6c110287ed05f9c9010908b69bcbf67 (diff)
downloadmediahub-0708eb630654eb8e30a305c9275cc9ecbe98df76.tar.gz
mediahub-0708eb630654eb8e30a305c9275cc9ecbe98df76.tar.bz2
mediahub-0708eb630654eb8e30a305c9275cc9ecbe98df76.zip
Merge branch 'tizen' of ssh://review.tizen.org:29418/profile/tv/apps/dotnet/mediahub into tizen
Change-Id: Ie85e9df936ae67c78a63a65311f6e3c12bfa57f1 Signed-off-by: Sung-jae Park <nicesj@nicesj.com>
-rwxr-xr-xTVMediaHub/TVMediaHub.Tizen/Models/ContentProvider.cs7
-rwxr-xr-xTVMediaHub/TVMediaHub.Tizen/Models/VideoProvider.cs2
-rwxr-xr-xTVMediaHub/TVMediaHub.Tizen/ViewModels/ImageTabViewModel.cs8
-rwxr-xr-xTVMediaHub/TVMediaHub.Tizen/ViewModels/MusicTabViewModel.cs7
-rwxr-xr-xTVMediaHub/TVMediaHub.Tizen/ViewModels/VideoTabViewModel.cs12
-rwxr-xr-xTVMediaHub/TVMediaHub.Tizen/bin/Debug/TVMediaHub.Tizen.tpkbin1890810 -> 2662361 bytes
6 files changed, 16 insertions, 20 deletions
diff --git a/TVMediaHub/TVMediaHub.Tizen/Models/ContentProvider.cs b/TVMediaHub/TVMediaHub.Tizen/Models/ContentProvider.cs
index 692ec9a..4072c37 100755
--- a/TVMediaHub/TVMediaHub.Tizen/Models/ContentProvider.cs
+++ b/TVMediaHub/TVMediaHub.Tizen/Models/ContentProvider.cs
@@ -202,7 +202,6 @@ namespace TVMediaHub.Tizen.Models
{
return await Task.Run(() =>
{
- DbgPort.D("MG Async");
List<GroupItem> result = new List<GroupItem>();
GroupItem lastGroupItem = null;
GroupItem currentGroupItem = null;
@@ -331,15 +330,15 @@ namespace TVMediaHub.Tizen.Models
/// </summary>
/// <param name="list">A list of media contents</param>
/// <returns>A path of thumbnail</returns>
- public async Task CheckThumbnail(IEnumerable<MediaShortcutInfo> list)
+ public async Task CheckThumbnail(IEnumerable<MediaInformationEx> list)
{
foreach (var info in list)
{
- if (info.Information.MediaContentInformation.ThumbnailPath == null)
+ if (string.IsNullOrEmpty(info.MediaContentInformation.ThumbnailPath))
{
try
{
- string path = await MediaHubImpl.GetInstance.MediaInfoCommand.CreateThumbnailAsync(info.Information.MediaContentInformation.Id);
+ string path = await MediaHubImpl.GetInstance.MediaInfoCommand.CreateThumbnailAsync(info.MediaContentInformation.Id);
}
catch (Exception e)
{
diff --git a/TVMediaHub/TVMediaHub.Tizen/Models/VideoProvider.cs b/TVMediaHub/TVMediaHub.Tizen/Models/VideoProvider.cs
index 0482852..0c3cd2b 100755
--- a/TVMediaHub/TVMediaHub.Tizen/Models/VideoProvider.cs
+++ b/TVMediaHub/TVMediaHub.Tizen/Models/VideoProvider.cs
@@ -66,7 +66,7 @@ namespace TVMediaHub.Tizen.Models
public MediaInformationEx GetRecentlyPlayedVideo()
{
var selectArguments = new SelectArguments();
- selectArguments.SortOrder = "MEDIA_LAST_PLAYED_TIME";
+ selectArguments.SortOrder = "MEDIA_LAST_PLAYED_TIME";
selectArguments.FilterExpression = GetConditionStringForSelection();
List<MediaInfo> mediaInformationList = new List<MediaInfo>();
diff --git a/TVMediaHub/TVMediaHub.Tizen/ViewModels/ImageTabViewModel.cs b/TVMediaHub/TVMediaHub.Tizen/ViewModels/ImageTabViewModel.cs
index 749d0b2..dd7abf6 100755
--- a/TVMediaHub/TVMediaHub.Tizen/ViewModels/ImageTabViewModel.cs
+++ b/TVMediaHub/TVMediaHub.Tizen/ViewModels/ImageTabViewModel.cs
@@ -575,11 +575,11 @@ namespace TVMediaHub.Tizen.ViewModels
private async void ReadImageList(SortOption option, string storageID = null)
{
ImageList.Clear();
+
+ IEnumerable<MediaInformationEx> list = await MediaHubImpl.GetInstance.ImageProviderInstance.ReadWithoutGroupAsync(SortOption.Title);
+ await MediaHubImpl.GetInstance.ImageProviderInstance.CheckThumbnail(list);
+
IEnumerable<GroupItem> tempList = await MediaHubImpl.GetInstance.ImageProviderInstance.ReadAsync(option, storageID);
- foreach (var group in tempList)
- {
- await MediaHubImpl.GetInstance.ImageProviderInstance.CheckThumbnail(group.Contents);
- }
IsNeededClearList = true;
diff --git a/TVMediaHub/TVMediaHub.Tizen/ViewModels/MusicTabViewModel.cs b/TVMediaHub/TVMediaHub.Tizen/ViewModels/MusicTabViewModel.cs
index 851b044..a953a38 100755
--- a/TVMediaHub/TVMediaHub.Tizen/ViewModels/MusicTabViewModel.cs
+++ b/TVMediaHub/TVMediaHub.Tizen/ViewModels/MusicTabViewModel.cs
@@ -213,11 +213,10 @@ namespace TVMediaHub.Tizen.ViewModels
private async void ReadMusicList(SortOption option, string storageID = null)
{
MusicList.Clear();
+ IEnumerable<MediaInformationEx> list = await MediaHubImpl.GetInstance.MusicProviderInstance.ReadWithoutGroupAsync(SortOption.Title);
+ await MediaHubImpl.GetInstance.MusicProviderInstance.CheckThumbnail(list);
+
IEnumerable<GroupItem> templist = await MediaHubImpl.GetInstance.MusicProviderInstance.ReadAsync(option, storageID);
- foreach (var group in templist)
- {
- await MediaHubImpl.GetInstance.MusicProviderInstance.CheckThumbnail(group.Contents);
- }
foreach (var group in templist)
{
diff --git a/TVMediaHub/TVMediaHub.Tizen/ViewModels/VideoTabViewModel.cs b/TVMediaHub/TVMediaHub.Tizen/ViewModels/VideoTabViewModel.cs
index 126394b..dce44a8 100755
--- a/TVMediaHub/TVMediaHub.Tizen/ViewModels/VideoTabViewModel.cs
+++ b/TVMediaHub/TVMediaHub.Tizen/ViewModels/VideoTabViewModel.cs
@@ -26,6 +26,7 @@ using TVMediaHub.Tizen.Utils;
using TVMediaHub.Tizen.DataModels;
using Xamarin.Forms;
using Tizen.Xamarin.Forms.Extension;
+using System.Threading.Tasks;
namespace TVMediaHub.Tizen.ViewModels
{
@@ -222,7 +223,6 @@ namespace TVMediaHub.Tizen.ViewModels
/// </summary>
public VideoTabViewModel()
{
- DbgPort.D("Binding Context cotr " + DateTime.Now);
VideoList = new ObservableCollection<GroupItem>();
SelectedList = new List<MediaInformationEx>();
PlayList = new List<MediaInformationEx>();
@@ -450,18 +450,16 @@ namespace TVMediaHub.Tizen.ViewModels
{
VideoList.Clear();
+ IEnumerable<MediaInformationEx> list = await MediaHubImpl.GetInstance.VideoProviderInstance.ReadWithoutGroupAsync(SortOption.Title);
+ await MediaHubImpl.GetInstance.VideoProviderInstance.CheckThumbnail(list);
+
IEnumerable<GroupItem> tempList = await MediaHubImpl.GetInstance.VideoProviderInstance.ReadAsync(option, storageId);
- foreach (var group in tempList)
- {
- await MediaHubImpl.GetInstance.VideoProviderInstance.CheckThumbnail(group.Contents);
- }
IsNeededClearList = true;
foreach (var group in tempList)
{
- //await Task.Delay(1);
- VideoList.Add(group);
+ VideoList.Add(group);
}
IsNeededClearList = false;
diff --git a/TVMediaHub/TVMediaHub.Tizen/bin/Debug/TVMediaHub.Tizen.tpk b/TVMediaHub/TVMediaHub.Tizen/bin/Debug/TVMediaHub.Tizen.tpk
index d4989bb..ad039cc 100755
--- a/TVMediaHub/TVMediaHub.Tizen/bin/Debug/TVMediaHub.Tizen.tpk
+++ b/TVMediaHub/TVMediaHub.Tizen/bin/Debug/TVMediaHub.Tizen.tpk
Binary files differ