Fix Issue : Change MediaContent APIs 81/145981/2 accepted/tizen/unified/20170824.172638 submit/tizen/20170824.102218
authorhjjang <heonjae.jang@samsung.com>
Thu, 24 Aug 2017 10:09:56 +0000 (19:09 +0900)
committerhjjang <heonjae.jang@samsung.com>
Thu, 24 Aug 2017 10:12:41 +0000 (19:12 +0900)
Change-Id: If6a9504380f9d4f2a6eb09b4d5465c7432c0cb7c
Signed-off-by: hjjang <heonjae.jang@samsung.com>
23 files changed:
TVMediaHub/TVMediaHub.Tizen/DataModels/MediaInformationEx.cs
TVMediaHub/TVMediaHub.Tizen/Models/ContentProvider.cs
TVMediaHub/TVMediaHub.Tizen/Models/ImageProvider.cs
TVMediaHub/TVMediaHub.Tizen/Models/MediaHubImpl.cs
TVMediaHub/TVMediaHub.Tizen/Models/MediaShortcutInfo.cs
TVMediaHub/TVMediaHub.Tizen/Models/MusicPlayerModel.cs
TVMediaHub/TVMediaHub.Tizen/Models/StorageProvider.cs
TVMediaHub/TVMediaHub.Tizen/Models/VideoProvider.cs
TVMediaHub/TVMediaHub.Tizen/TVMediaHub.Tizen.csproj
TVMediaHub/TVMediaHub.Tizen/TVMediaHub.Tizen.nuget.targets
TVMediaHub/TVMediaHub.Tizen/TVMediaHub.Tizen.project.json
TVMediaHub/TVMediaHub.Tizen/ViewModels/ImageTabViewModel.cs
TVMediaHub/TVMediaHub.Tizen/ViewModels/MusicTabViewModel.cs
TVMediaHub/TVMediaHub.Tizen/ViewModels/VideoTabViewModel.cs
TVMediaHub/TVMediaHub.Tizen/Views/ImageItem.xaml.cs
TVMediaHub/TVMediaHub.Tizen/Views/ImageTab.xaml.cs
TVMediaHub/TVMediaHub.Tizen/Views/MusicItem.xaml.cs
TVMediaHub/TVMediaHub.Tizen/Views/MusicTab.xaml.cs
TVMediaHub/TVMediaHub.Tizen/Views/VideoItem.xaml.cs
TVMediaHub/TVMediaHub.Tizen/Views/VideoPlayer.xaml.cs
TVMediaHub/TVMediaHub.Tizen/Views/VideoTab.xaml.cs
TVMediaHub/TVMediaHub.Tizen/bin/Debug/TVMediaHub.Tizen.tpk
TVMediaHub/TVMediaHub.Tizen/tizen-manifest.xml

index 92fe788..41b378e 100644 (file)
@@ -23,7 +23,7 @@ namespace TVMediaHub.Tizen.DataModels
         /// <summary>
         /// The media content information
         /// </summary>
-        public MediaInformation MediaContentInformation;
+        public MediaInfo MediaContentInformation;
 
         /// <summary>
         /// An attribute of the availability of this media content
index e4d9e71..261ce93 100755 (executable)
@@ -73,8 +73,7 @@ namespace TVMediaHub.Tizen.Models
         {
             try
             {
-                ContentDatabase.Connect();
-                ContentDatabase.ContentUpdated += ContentDatabaseContentUpdated;
+                MediaDatabase.MediaInfoUpdated += MediaDatabaseMediaUpdated;
             }
             catch (Exception e)
             {
@@ -88,9 +87,9 @@ namespace TVMediaHub.Tizen.Models
         /// </summary>
         /// <param name="sender">The source of the event</param>
         /// <param name="e">A ContentUpdatedEvent arguments</param>
-        private void ContentDatabaseContentUpdated(object sender, ContentUpdatedEventArgs e)
+        private void MediaDatabaseMediaUpdated(object sender, MediaInfoUpdatedEventArgs e)
         {
-            if (e.UpdateType == MediaContentDBUpdateType.Update)
+            if (e.OperationType == OperationType.Update)
             {
                 MediaHubImpl.GetInstance.StorageProviderInstance.CheckStorage();
                 ContentUpdateFinished?.Invoke(this, null);
@@ -140,10 +139,10 @@ namespace TVMediaHub.Tizen.Models
 
                     break;
                 case SortOption.Date:
-                    if (lastGroupItem == null || lastGroupItem.Title != GetDateString(mediaInformationEx.MediaContentInformation.TimeLine))
+                    if (lastGroupItem == null || lastGroupItem.Title != GetDateString(mediaInformationEx.MediaContentInformation.Timeline.DateTime))
                     {
                         newGroupFlag = true;
-                        newTitle = GetDateString(mediaInformationEx.MediaContentInformation.TimeLine);
+                        newTitle = GetDateString(mediaInformationEx.MediaContentInformation.Timeline.DateTime);
                     }
 
                     break;
@@ -164,18 +163,18 @@ namespace TVMediaHub.Tizen.Models
 
                     break;
                 case SortOption.Album:
-                    if (lastGroupItem == null || lastGroupItem.Title != (mediaInformationEx.MediaContentInformation as AudioInformation)?.Album)
+                    if (lastGroupItem == null || lastGroupItem.Title != (mediaInformationEx.MediaContentInformation as AudioInfo)?.Album)
                     {
                         newGroupFlag = true;
-                        newTitle = (mediaInformationEx.MediaContentInformation as AudioInformation)?.Album.ToString();
+                        newTitle = (mediaInformationEx.MediaContentInformation as AudioInfo)?.Album.ToString();
                     }
 
                     break;
                 case SortOption.Artist:
-                    if (lastGroupItem == null || lastGroupItem.Title != (mediaInformationEx.MediaContentInformation as AudioInformation)?.Artist)
+                    if (lastGroupItem == null || lastGroupItem.Title != (mediaInformationEx.MediaContentInformation as AudioInfo)?.Artist)
                     {
                         newGroupFlag = true;
-                        newTitle = (mediaInformationEx.MediaContentInformation as AudioInformation)?.Artist.ToString();
+                        newTitle = (mediaInformationEx.MediaContentInformation as AudioInfo)?.Artist.ToString();
                     }
 
                     break;
@@ -255,27 +254,27 @@ namespace TVMediaHub.Tizen.Models
         public IEnumerable<MediaInformationEx> ReadWithoutGroup(SortOption sortOption, string storageId = null, int offset = -1, int count = -1)
         {
             // Makes Content Filter by arguments
-            var contentFilter = new ContentFilter();
+            var selectArguments = new SelectArguments();
 
             switch (sortOption)
             {
                 case SortOption.Title:
-                    contentFilter.OrderKey = "MEDIA_DISPLAY_NAME";
+                    selectArguments.SortOrder = "MEDIA_DISPLAY_NAME";
                     break;
                 case SortOption.Date:
-                    contentFilter.OrderKey = "MEDIA_RECORDED_DATE";
+                    selectArguments.SortOrder = "MEDIA_RECORDED_DATE";
                     break;
                 case SortOption.Genre:
-                    contentFilter.OrderKey = "MEDIA_GENRE";
+                    selectArguments.SortOrder = "MEDIA_GENRE";
                     break;
                 case SortOption.Type:
-                    contentFilter.OrderKey = "MEDIA_TYPE";
+                    selectArguments.SortOrder = "MEDIA_TYPE";
                     break;
                 case SortOption.Album:
-                    contentFilter.OrderKey = "MEDIA_ALBUM";
+                    selectArguments.SortOrder = "MEDIA_ALBUM";
                     break;
                 case SortOption.Artist:
-                    contentFilter.OrderKey = "MEDIA_ARTIST";
+                    selectArguments.SortOrder = "MEDIA_ARTIST";
                     break;
                 default:
                     throw new System.ArgumentException("Invalid sorting option.");
@@ -283,28 +282,33 @@ namespace TVMediaHub.Tizen.Models
 
             if (offset >= 0)
             {
-                contentFilter.Offset = offset;
+                selectArguments.StartRowIndex = offset;
             }
 
             if (count >= 0)
             {
-                contentFilter.Count = count;
+                selectArguments.TotalRowCount = count;
             }
 
             if (storageId != null)
             {
-                contentFilter.StorageId = storageId;
+                selectArguments.StorageId = storageId;
             }
 
-            contentFilter.Condition = GetConditionStringForSelection();
-
+            selectArguments.FilterExpression = GetConditionStringForSelection();
             // Executes the 'select' query
-            IEnumerable<MediaInformation> mediaInformationList;
+            List<MediaInfo> mediaInformationList = new List<MediaInfo>();
             List<MediaInformationEx> mediaInformationExList = new List<MediaInformationEx>();
             try
             {
-                mediaInformationList = ContentManager.Database.SelectAll<MediaInformation>(contentFilter);
-                foreach (MediaInformation mediaInformation in mediaInformationList)
+                var reader = MediaHubImpl.GetInstance.MediaInfoCommand.SelectMedia(selectArguments);
+
+                while (reader.Read())
+                {
+                    mediaInformationList.Add(reader.Current);
+                }
+
+                foreach (MediaInfo mediaInformation in mediaInformationList)
                 {
                     var mediaInformationEx = new MediaInformationEx();
 
@@ -334,7 +338,7 @@ namespace TVMediaHub.Tizen.Models
                 {
                     try
                     {
-                        string path = await info.Information.MediaContentInformation.CreateThumbnailAsync();
+                        string path = await MediaHubImpl.GetInstance.MediaInfoCommand.CreateThumbnailAsync(info.Information.MediaContentInformation.Id);
                     }
                     catch (Exception e)
                     {
@@ -357,27 +361,27 @@ namespace TVMediaHub.Tizen.Models
 #pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
         {
             // Makes Content Filter by arguments
-            var contentFilter = new ContentFilter();
+            var selectArguments = new SelectArguments();
 
             switch (sortOption)
             {
                 case SortOption.Title:
-                    contentFilter.OrderKey = "MEDIA_DISPLAY_NAME";
+                    selectArguments.SortOrder = "MEDIA_DISPLAY_NAME";
                     break;
                 case SortOption.Date:
-                    contentFilter.OrderKey = "MEDIA_RECORDED_DATE";
+                    selectArguments.SortOrder = "MEDIA_RECORDED_DATE";
                     break;
                 case SortOption.Genre:
-                    contentFilter.OrderKey = "MEDIA_GENRE";
+                    selectArguments.SortOrder = "MEDIA_GENRE";
                     break;
                 case SortOption.Type:
-                    contentFilter.OrderKey = "MEDIA_TYPE";
+                    selectArguments.SortOrder = "MEDIA_TYPE";
                     break;
                 case SortOption.Album:
-                    contentFilter.OrderKey = "MEDIA_ALBUM";
+                    selectArguments.SortOrder = "MEDIA_ALBUM";
                     break;
                 case SortOption.Artist:
-                    contentFilter.OrderKey = "MEDIA_ARTIST";
+                    selectArguments.SortOrder = "MEDIA_ARTIST";
                     break;
                 default:
                     throw new System.ArgumentException("Invalid sorting option.");
@@ -385,28 +389,36 @@ namespace TVMediaHub.Tizen.Models
 
             if (offset >= 0)
             {
-                contentFilter.Offset = offset;
+                selectArguments.StartRowIndex = offset;
             }
 
             if (count >= 0)
             {
-                contentFilter.Count = count;
+                selectArguments.TotalRowCount = count;
             }
 
             if (storageId != null)
             {
-                contentFilter.StorageId = storageId;
+                selectArguments.StorageId = storageId;
             }
 
-            contentFilter.Condition = GetConditionStringForSelection();
+            selectArguments.FilterExpression = GetConditionStringForSelection();
 
             // Executes the 'select' query
+            List<MediaInfo> mediaInformationList = new List<MediaInfo>();
             List<MediaInformationEx> mediaInformationExList = new List<MediaInformationEx>();
             try
             {
-                IEnumerable<MediaInformation> mediaInformationList = ContentManager.Database.SelectAll<MediaInformation>(contentFilter);
 
-                foreach (MediaInformation mediaInformation in mediaInformationList)
+                var reader = MediaHubImpl.GetInstance.MediaInfoCommand.SelectMedia(selectArguments);
+
+                while (reader.Read())
+                {
+                    mediaInformationList.Add(reader.Current);
+                }
+
+
+                foreach (MediaInfo mediaInformation in mediaInformationList)
                 {
                     var mediaInformationEx = new MediaInformationEx();
 
@@ -446,7 +458,7 @@ namespace TVMediaHub.Tizen.Models
         public MediaInformationEx Read(String mediaID)
         {
             var mediaInformationEx = new MediaInformationEx();
-            mediaInformationEx.MediaContentInformation = ContentManager.Database.Select(mediaID);
+            mediaInformationEx.MediaContentInformation = MediaHubImpl.GetInstance.MediaInfoCommand.SelectMedia(mediaID);
             return mediaInformationEx;
         }
 
@@ -459,7 +471,7 @@ namespace TVMediaHub.Tizen.Models
         {
             try
             {
-                ContentManager.Database.Delete(media.MediaContentInformation);
+                MediaHubImpl.GetInstance.MediaInfoCommand.Delete(media.MediaContentInformation.Id);
             }
             catch (Exception exception)
             {
@@ -478,7 +490,8 @@ namespace TVMediaHub.Tizen.Models
         {
             try
             {
-                ContentManager.Database.Update(media.MediaContentInformation);
+                // @TODO : CHECK POINT 170824
+                //MediaHubImpl.GetInstance.MediaInfoCommand.Update(media.MediaContentInformation.Id);
             }
             catch (Exception exception)
             {
index 3651963..3bbd667 100755 (executable)
@@ -48,10 +48,10 @@ namespace TVMediaHub.Tizen.Models
         /// <param name="mediaContent">A media content to be checked the availability</param>
         protected override void CheckUnavailableContent(MediaInformationEx mediaContent)
         {
-            if (mediaContent.MediaContentInformation.FilePath != null)
+            if (mediaContent.MediaContentInformation.Path != null)
             {
                 // Check 1 : The size of the image file must be less than 4MB.
-                var fileInfo = new FileInfo(mediaContent.MediaContentInformation.FilePath);
+                var fileInfo = new FileInfo(mediaContent.MediaContentInformation.Path);
 
                 if (fileInfo?.Length > 8 * 1024 * 1024)
                 {
index 4d4a51d..044e1cc 100755 (executable)
@@ -15,6 +15,8 @@
  */
 
 
+using Tizen.Content.MediaContent;
+
 namespace TVMediaHub.Tizen.Models
 {
     /// <summary>
@@ -101,6 +103,49 @@ namespace TVMediaHub.Tizen.Models
             }
         }
 
+        private MediaDatabase mediaDatabase ;
+
+        public MediaDatabase MediaDatabase
+        {
+            get
+            {
+                if (mediaDatabase == null)
+                {
+                    mediaDatabase = new MediaDatabase();
+                    mediaDatabase.Connect();
+                }
+                return mediaDatabase;
+            }
+        }
+
+        private static MediaInfoCommand mediaInfoCommand;
+
+        public MediaInfoCommand MediaInfoCommand
+        {
+            get
+            {
+                if (mediaInfoCommand == null)
+                {
+                    mediaInfoCommand = new MediaInfoCommand(MediaDatabase);
+                }
+                return mediaInfoCommand;
+            }
+        }
+
+        private static StorageCommand storageCommand;
+
+        public StorageCommand StorageCommand
+        {
+            get
+            {
+                if (storageCommand == null)
+                {
+                    storageCommand = new StorageCommand(MediaDatabase);
+                }
+                return storageCommand;
+            }
+        }
+
         /// <summary>
         /// A constructor
         /// </summary>
index dc49f5f..51858b8 100755 (executable)
@@ -82,7 +82,7 @@ namespace TVMediaHub.Tizen.Models
             {
                 if (Information.MediaContentInformation.ThumbnailPath == null)
                 {
-                    return Information.MediaContentInformation.FilePath + ".tn";
+                    return Information.MediaContentInformation.Path + ".tn";
                 }
                 else
                 {
index 6844833..fd220ba 100644 (file)
@@ -119,21 +119,21 @@ namespace TVMediaHub.Tizen.Models
                     }
 
                     /// 2. Play the current music
-                    StartPlayerAsync((currentMusic.MediaContentInformation as AudioInformation).FilePath);                  
+                    StartPlayerAsync((currentMusic.MediaContentInformation as AudioInfo).Path);
 
                     /// 3. Update the information of the current music
                     MusicPlayerInfoListener?.Invoke(this, new MusicPlayerInfoEventArgs()
                     {
-                        Title = (currentMusic.MediaContentInformation as AudioInformation).Title,
-                        Artist = (currentMusic.MediaContentInformation as AudioInformation).Artist,
-                        AlbumCover = ((currentMusic.MediaContentInformation as AudioInformation).ThumbnailPath.Length != 0) ? (currentMusic.MediaContentInformation as AudioInformation).ThumbnailPath : "img_media_no_contents.png",
-                        AlbumName = (currentMusic.MediaContentInformation as AudioInformation).Album
+                        Title = (currentMusic.MediaContentInformation as AudioInfo).Title,
+                        Artist = (currentMusic.MediaContentInformation as AudioInfo).Artist,
+                        AlbumCover = ((currentMusic.MediaContentInformation as AudioInfo).ThumbnailPath.Length != 0) ? (currentMusic.MediaContentInformation as AudioInfo).ThumbnailPath : "img_media_no_contents.png",
+                        AlbumName = (currentMusic.MediaContentInformation as AudioInfo).Album
                     });
 
                     /// 4. Update the progressbar of the current music
                     MusicPlayerProgressListener?.Invoke(this, new MusicPlayerProgressEventArgs()
                     {
-                        Progress = (playerInstance.State == PlayerState.Idle || playerInstance.State == PlayerState.Preparing) ? 0 : Convert.ToDouble(playerInstance.GetPlayPosition()) / (currentMusic.MediaContentInformation as AudioInformation).Duration,
+                        Progress = (playerInstance.State == PlayerState.Idle || playerInstance.State == PlayerState.Preparing) ? 0 : Convert.ToDouble(playerInstance.GetPlayPosition()) / (currentMusic.MediaContentInformation as AudioInfo).Duration,
                     });
 
                     MusicPlayerStateChanged?.Invoke(this, new MusicPlayerStateEventArgs()
@@ -215,7 +215,7 @@ namespace TVMediaHub.Tizen.Models
             {
                 MusicPlayerProgressListener?.Invoke(this, new MusicPlayerProgressEventArgs()
                 {
-                    Progress = (playerInstance.State == PlayerState.Idle || playerInstance.State == PlayerState.Preparing) ? 0 : Convert.ToDouble(playerInstance.GetPlayPosition()) / (currentMusic.MediaContentInformation as AudioInformation).Duration,
+                    Progress = (playerInstance.State == PlayerState.Idle || playerInstance.State == PlayerState.Preparing) ? 0 : Convert.ToDouble(playerInstance.GetPlayPosition()) / (currentMusic.MediaContentInformation as AudioInfo).Duration,
                 });
             }, null, Timeout.Infinite, Timeout.Infinite);
         }
index 6dbc012..253a520 100755 (executable)
@@ -37,7 +37,7 @@ namespace TVMediaHub.Tizen.Models
         /// <summary>
         /// A list of external storage
         /// </summary>
-        private IEnumerable<Storage> storageList = new List<Storage>();
+        private List<Storage> storageList = new List<Storage>();
 
         /// <summary>
         /// A dictionary list of storage name and storage id
@@ -70,7 +70,13 @@ namespace TVMediaHub.Tizen.Models
         /// </summary>
         public void CheckStorage()
         {
-            storageList = ContentManager.Database.SelectAll<Storage>(null);
+            var reader = MediaHubImpl.GetInstance.StorageCommand.Select();
+
+            while (reader.Read())
+            {
+                storageList.Add(reader.Current);
+            }
+
             if (storageList.Count() < storageTable.Count)
             {
                 CheckRemoveStorage();
@@ -97,7 +103,7 @@ namespace TVMediaHub.Tizen.Models
         {
             foreach (var item in storageTable)
             {
-                Storage storage = ContentManager.Database.Select<Storage>(item.Key);
+                Storage storage = MediaHubImpl.GetInstance.StorageCommand.Select(item.Key);
 
                 if (storage == null)
                 {
index 0bcb5e8..0482852 100755 (executable)
@@ -65,16 +65,20 @@ namespace TVMediaHub.Tizen.Models
         /// <returns>A recently played video information</returns>
         public MediaInformationEx GetRecentlyPlayedVideo()
         {
-            var contentFilter = new ContentFilter();
-            contentFilter.OrderKey = "MEDIA_LAST_PLAYED_TIME";
-            contentFilter.Order = ContentOrder.Desc;
-            contentFilter.Condition = GetConditionStringForSelection();
+            var selectArguments = new SelectArguments();
+            selectArguments.SortOrder = "MEDIA_LAST_PLAYED_TIME";            
+            selectArguments.FilterExpression = GetConditionStringForSelection();
 
+            List<MediaInfo> mediaInformationList = new List<MediaInfo>();
             MediaInformationEx recentlyPlayedVideo = new MediaInformationEx();
-            IEnumerable<MediaInformation> mediaInformationList = null;
             try
             {
-                mediaInformationList = ContentManager.Database.SelectAll<MediaInformation>(contentFilter);
+                var reader = MediaHubImpl.GetInstance.MediaInfoCommand.SelectMedia(selectArguments);
+
+                while (reader.Read())
+                {
+                    mediaInformationList.Add(reader.Current);
+                }
             }
             catch (Exception exception)
             {
@@ -97,9 +101,10 @@ namespace TVMediaHub.Tizen.Models
         /// <param name="videoContent">A played media file</param>
         public void SetPlayedAt(MediaInformationEx videoContent)
         {
-            videoContent.MediaContentInformation.PlayedAt = DateTime.UtcNow;
-            DbgPort.D("PlayedAt : " + videoContent.MediaContentInformation.PlayedAt.ToString());
-            ContentManager.Database.Update(videoContent.MediaContentInformation);
+            // @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)
index f5e2089..202b85b 100755 (executable)
@@ -11,7 +11,7 @@
     <OutputType>Exe</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>TVMediaHub.Tizen</RootNamespace>
-    <AssemblyName>xamediahub</AssemblyName>
+    <AssemblyName>TVMediaHub.Tizen</AssemblyName>
     <FileAlignment>512</FileAlignment>
     <DefaultLanguage>en-US</DefaultLanguage>
   </PropertyGroup>
       </FlavorProperties>
     </VisualStudio>
   </ProjectExtensions>
-</Project>
+</Project>
\ No newline at end of file
index d223bc7..e114c4d 100644 (file)
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8" standalone="no"?>
 <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup Condition="'$(NuGetPackageRoot)' == ''">
-    <NuGetPackageRoot>$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
+  <PropertyGroup>
+    <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
   </PropertyGroup>
-  <ImportGroup>
-    <Import Project="$(NuGetPackageRoot)\Xamarin.Forms\2.3.5-r233-004\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('$(NuGetPackageRoot)\Xamarin.Forms\2.3.5-r233-004\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
+  <ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
+    <Import Project="$(NuGetPackageRoot)xamarin.forms\2.4.0-r266-001\build\netstandard1.0\Xamarin.Forms.targets" Condition="Exists('$(NuGetPackageRoot)xamarin.forms\2.4.0-r266-001\build\netstandard1.0\Xamarin.Forms.targets')" />
   </ImportGroup>
 </Project>
\ No newline at end of file
index af8f2d4..55be44b 100755 (executable)
@@ -6,15 +6,11 @@
     "preserveCompilationContext": true
   },
   "dependencies": {
-    "ElmSharp": "1.2.2",
     "Microsoft.NETCore.App": "1.1.2",
-    "Tizen.Applications": "1.5.8",
-    "Tizen.Content.MediaContent": "1.0.20",
-    "Tizen.Multimedia": "1.2.0",
-    "Tizen.Multimedia.MediaPlayer": "1.0.2",
-    "Tizen.Xamarin.Forms.Extension": "2.3.5-v00015",
+    "Tizen.NET": "4.0.0-preview1-00115",
+    "Tizen.Xamarin.Forms.Extension": "2.4.0-v00002",
     "Xamarin.Forms": "2.4.0-r266-001",
-    "Xamarin.Forms.Platform.Tizen": "2.3.5-r256-001"
+    "Xamarin.Forms.Platform.Tizen": "2.4.0-r266-005"
   },
   "runtimes": {
     "win": {},
index 94e310a..749d0b2 100755 (executable)
@@ -483,7 +483,7 @@ namespace TVMediaHub.Tizen.ViewModels
                 {
                     try
                     {
-                        File.Delete(info.MediaContentInformation.FilePath);
+                        File.Delete(info.MediaContentInformation.Path);
                     }
                     catch (Exception exception)
                     {
@@ -532,7 +532,7 @@ namespace TVMediaHub.Tizen.ViewModels
         {
             for (int i = 0; i < imagePlayList.Count; i++)
             {
-                if (imagePlayList[i].FilePath.Equals(info.MediaContentInformation.FilePath))
+                if (imagePlayList[i].FilePath.Equals(info.MediaContentInformation.Path))
                 {
                     DisplayingImageIndex = i;
                     return;
@@ -559,8 +559,8 @@ namespace TVMediaHub.Tizen.ViewModels
             ImageViewerInfomation ivInfo = new ImageViewerInfomation();
 
             ivInfo.Title = info.MediaContentInformation.Title;
-            ivInfo.Date = info.MediaContentInformation.ModifiedAt.ToString("ddd. d MMMM");
-            ivInfo.FilePath = info.MediaContentInformation.FilePath;
+            ivInfo.Date = info.MediaContentInformation.DateModified.ToString("ddd. d MMMM");
+            ivInfo.FilePath = info.MediaContentInformation.Path;
             ivInfo.ThumbnailPath = info.MediaContentInformation.ThumbnailPath;
             ivInfo.SavedRotation = 0;
 
index 4987beb..851b044 100755 (executable)
@@ -336,7 +336,7 @@ namespace TVMediaHub.Tizen.ViewModels
                 {
                     try
                     {
-                        File.Delete(info.MediaContentInformation.FilePath);
+                        File.Delete(info.MediaContentInformation.Path);
                     }
                     catch (Exception exception)
                     {
index 58bbca0..126394b 100755 (executable)
@@ -274,7 +274,7 @@ namespace TVMediaHub.Tizen.ViewModels
                 {
                     try
                     {
-                        File.Delete(info.MediaContentInformation.FilePath);
+                        File.Delete(info.MediaContentInformation.Path);
                     }
                     catch (Exception exception)
                     {
index f9633c3..a0e1c18 100755 (executable)
@@ -54,32 +54,32 @@ namespace TVMediaHub.Tizen.Views
         /// <summary>
         /// Bounds for ImageArea(Image Container) when item is unfocused
         /// </summary>
-        private Rectangle ImageAreaNormalBounds;
+        private Xamarin.Forms.Rectangle ImageAreaNormalBounds;
 
         /// <summary>
         /// Bounds for ImageArea(Image Container) when item is focused
         /// </summary>
-        private Rectangle ImageAreaFocusedBounds;
+        private Xamarin.Forms.Rectangle ImageAreaFocusedBounds;
 
         /// <summary>
         /// Bounds for Content Image when item is unfocused
         /// </summary>
-        private Rectangle ImageBounds;
+        private Xamarin.Forms.Rectangle ImageBounds;
 
         /// <summary>
         /// Bounds for Content Image when item is focused
         /// </summary>
-        private Rectangle ImageFocusedBounds;
+        private Xamarin.Forms.Rectangle ImageFocusedBounds;
 
         /// <summary>
         /// Bounds for Shadow Image when item is unfocused
         /// </summary>
-        private Rectangle ShadowNormalBounds;
+        private Xamarin.Forms.Rectangle ShadowNormalBounds;
 
         /// <summary>
         /// Bounds for Shadow Image when item is focused
         /// </summary>
-        private Rectangle ShadowFocusedBounds;
+        private Xamarin.Forms.Rectangle ShadowFocusedBounds;
 
         /// <summary>
         /// An EventHandler for focus event of the item
@@ -181,14 +181,14 @@ namespace TVMediaHub.Tizen.Views
             WidthRequest = h332;
             HeightRequest = h332;
 
-            ImageBounds = new Rectangle(-w76, -h76, w332, h332);
-            ImageFocusedBounds = new Rectangle(-w64, -h64, w332, h332);
+            ImageBounds = new Xamarin.Forms.Rectangle(-w76, -h76, w332, h332);
+            ImageFocusedBounds = new Xamarin.Forms.Rectangle(-w64, -h64, w332, h332);
 
-            ImageAreaNormalBounds = new Rectangle(w76, h76, SizeUtils.GetWidthSize(180), SizeUtils.GetHeightSize(180));
-            ImageAreaFocusedBounds = new Rectangle(w64, h64, SizeUtils.GetWidthSize(204), SizeUtils.GetHeightSize(204));
+            ImageAreaNormalBounds = new Xamarin.Forms.Rectangle(w76, h76, SizeUtils.GetWidthSize(180), SizeUtils.GetHeightSize(180));
+            ImageAreaFocusedBounds = new Xamarin.Forms.Rectangle(w64, h64, SizeUtils.GetWidthSize(204), SizeUtils.GetHeightSize(204));
 
-            ShadowNormalBounds = new Rectangle(SizeUtils.GetWidthSize(12), SizeUtils.GetWidthSize(12), SizeUtils.GetWidthSize(308), SizeUtils.GetHeightSize(308));
-            ShadowFocusedBounds = new Rectangle(0, 0, w332, h332);
+            ShadowNormalBounds = new Xamarin.Forms.Rectangle(SizeUtils.GetWidthSize(12), SizeUtils.GetWidthSize(12), SizeUtils.GetWidthSize(308), SizeUtils.GetHeightSize(308));
+            ShadowFocusedBounds = new Xamarin.Forms.Rectangle(0, 0, w332, h332);
 
             ImgFocused.BorderLeft = w20;
             ImgFocused.BorderRight = w20;
index e7ed02b..59e0525 100755 (executable)
@@ -719,10 +719,10 @@ namespace TVMediaHub.Tizen.Views
             {
                 case ImageContextPopupItem.FileInfo:
                     string message = "File name  : " + info.MediaContentInformation.Title + "\n";
-                    message += "File size : " + info.MediaContentInformation.Size + "\n";
+                    message += "File size : " + info.MediaContentInformation.FileSize + "\n";
                     message += "File format : " + info.MediaContentInformation.MimeType + "\n";
-                    message += "File size : " + info.MediaContentInformation.Size + "\n";
-                    message += "File path : " + info.MediaContentInformation.FilePath;
+                    message += "File size : " + info.MediaContentInformation.FileSize + "\n";
+                    message += "File path : " + info.MediaContentInformation.Path;
 
                     await DisplayAlert("File Information", message, "Close");
                     Dialog dialog = new Dialog();
index d8e6a31..10b9df0 100755 (executable)
@@ -77,12 +77,12 @@ namespace TVMediaHub.Tizen.Views
         /// <summary>
         /// Bounds for TextArea when item is unfocused
         /// </summary>
-        private Rectangle TextAreaNormalBounds;
+        private Xamarin.Forms.Rectangle TextAreaNormalBounds;
 
         /// <summary>
         /// Bounds for TextArea when item is focused
         /// </summary>
-        private Rectangle TextAreaFocusedBounds;
+        private Xamarin.Forms.Rectangle TextAreaFocusedBounds;
 
         /// <summary>
         /// An enumeration for context popup selectable items
@@ -134,14 +134,17 @@ namespace TVMediaHub.Tizen.Views
             Artist.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Normal);
             AlbumTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Light);
 
-            SlideEffect.SetSlideDuration(SongTitle, 15000);
-            SlideEffect.SetSlideMode(SongTitle, SlideMode.Auto);
+            TextSlideEffect.SetDuration(SongTitle, 15000);
+            TextSlideEffect.SetIsAlwaysOn(SongTitle, true);
 
-            SlideEffect.SetSlideDuration(Artist, 15000);
-            SlideEffect.SetSlideMode(Artist, SlideMode.Auto);
+            TextSlideEffect.SetDuration(Artist, 15000);
+            TextSlideEffect.SetIsAlwaysOn(Artist, true);
 
-            SlideEffect.SetSlideDuration(AlbumTitle, 15000);
-            SlideEffect.SetSlideMode(AlbumTitle, SlideMode.Auto);
+            TextSlideEffect.SetDuration(SongTitle, 15000);
+            TextSlideEffect.SetIsAlwaysOn(SongTitle, true);
+
+            TextSlideEffect.SetDuration(AlbumTitle, 15000);
+            TextSlideEffect.SetIsAlwaysOn(AlbumTitle, true);
         }
 
         /// <summary>
@@ -165,8 +168,8 @@ namespace TVMediaHub.Tizen.Views
             Shadow.BorderLeft = SizeUtils.GetWidthSize(64);
             Shadow.BorderRight = SizeUtils.GetWidthSize(64);
 
-            TextAreaNormalBounds = new Rectangle(SizeUtils.GetWidthSize(202), SizeUtils.GetHeightSize(68), w446, SizeUtils.GetHeightSize(134));
-            TextAreaFocusedBounds = new Rectangle(SizeUtils.GetWidthSize(206), SizeUtils.GetHeightSize(64), w446, SizeUtils.GetHeightSize(142));
+            TextAreaNormalBounds = new Xamarin.Forms.Rectangle(SizeUtils.GetWidthSize(202), SizeUtils.GetHeightSize(68), w446, SizeUtils.GetHeightSize(134));
+            TextAreaFocusedBounds = new Xamarin.Forms.Rectangle(SizeUtils.GetWidthSize(206), SizeUtils.GetHeightSize(64), w446, SizeUtils.GetHeightSize(142));
 
             AlbumCover.WidthRequest = w134;
             AlbumCover.HeightRequest = h134;
@@ -217,18 +220,19 @@ namespace TVMediaHub.Tizen.Views
 
             SongTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Medium);
             SongTitle.TextColor = Color.FromHex("000000");
-            SlideEffect.SetHasSlide(SongTitle, true);
+            TextSlideEffect.SetIsTextSliding(SongTitle, true);
 
 
             Artist.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Medium);
             Artist.Opacity = 0.8;
             Artist.TextColor = Color.FromHex("000000");
-            SlideEffect.SetHasSlide(Artist, true);
+            TextSlideEffect.SetIsTextSliding(Artist, true);
 
             AlbumTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Normal);
             AlbumTitle.Opacity = 0.7;
             AlbumTitle.TextColor = Color.FromHex("000000");
-            SlideEffect.SetHasSlide(AlbumTitle, true);
+            TextSlideEffect.SetIsTextSliding(AlbumTitle, true);
+
             Shadow.IsVisible = true;
             OnFocusedEventHandler?.Invoke(sender, e);
         }
@@ -247,17 +251,18 @@ namespace TVMediaHub.Tizen.Views
 
             SongTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Normal);
             SongTitle.TextColor = Color.FromHex("ffffff");
-            SlideEffect.SetHasSlide(SongTitle, false);
+            TextSlideEffect.SetIsTextSliding(SongTitle, false);
 
             Artist.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Normal);
             Artist.Opacity = 0.6;
             Artist.TextColor = Color.FromHex("ffffff");
-            SlideEffect.SetHasSlide(Artist, false);
+            TextSlideEffect.SetIsTextSliding(Artist, false);
 
             AlbumTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Light);
             AlbumTitle.Opacity = 0.5;
             AlbumTitle.TextColor = Color.FromHex("ffffff");
-            SlideEffect.SetHasSlide(AlbumTitle, false);
+            TextSlideEffect.SetIsTextSliding(AlbumTitle, false);
+
             TextBackground.Source = "img_music_list_normal.9.png";
             Shadow.IsVisible = false;
             OnUnfocusedEventHandler.Invoke(sender, e);
@@ -272,7 +277,7 @@ namespace TVMediaHub.Tizen.Views
         {
             if (e.PropertyName.Equals("MusicInfo"))
             {
-                AudioInformation info = MusicInfo.MediaContentInformation as AudioInformation;
+                AudioInfo info = MusicInfo.MediaContentInformation as AudioInfo;
                 AlbumCover.Source = !(string.IsNullOrEmpty(info.ThumbnailPath)) ? info.ThumbnailPath : "img_music_nocover.png";
 
                 SongTitle.Text = info.Title;
index 61193ea..ee5a368 100755 (executable)
@@ -535,10 +535,10 @@ namespace TVMediaHub.Tizen.Views
             {
                 case MusicContextPopupItem.FileInfo:
                     string message = "File name  : " + info.MediaContentInformation.Title + "\n";
-                    message += "File size : " + info.MediaContentInformation.Size + "\n";
+                    message += "File size : " + info.MediaContentInformation.FileSize + "\n";
                     message += "File format : " + info.MediaContentInformation.MimeType + "\n";
-                    message += "File size : " + info.MediaContentInformation.Size + "\n";
-                    message += "File path : " + info.MediaContentInformation.FilePath;
+                    message += "File size : " + info.MediaContentInformation.FileSize + "\n";
+                    message += "File path : " + info.MediaContentInformation.Path;
 
                     await DisplayAlert("File Information", message, "Close");
                     Dialog dialog = new Dialog();
index 738d20d..3924cbb 100755 (executable)
@@ -58,42 +58,42 @@ namespace TVMediaHub.Tizen.Views
         /// <summary>
         /// Bounds for ImageArea(Image Container) when item is unfocused
         /// </summary>
-        private Rectangle NormalBounds;
+        private Xamarin.Forms.Rectangle NormalBounds;
 
         /// <summary>
         /// Bounds for ImageArea(Image Container) when item is focused
         /// </summary>
-        private Rectangle FocusedBounds;
+        private Xamarin.Forms.Rectangle FocusedBounds;
 
         /// <summary>
         /// Bounds for Shadow Image when item is unfocused
         /// </summary>
-        private Rectangle NormalShadowBounds;
+        private Xamarin.Forms.Rectangle NormalShadowBounds;
 
         /// <summary>
         /// Bounds for Shadow Image when item is focused
         /// </summary>
-        private Rectangle FocusedShadowBounds;
+        private Xamarin.Forms.Rectangle FocusedShadowBounds;
 
         /// <summary>
         /// Bounds for Content Image when item is unfocused
         /// </summary>
-        private Rectangle NormalContentImageBounds;
+        private Xamarin.Forms.Rectangle NormalContentImageBounds;
 
         /// <summary>
         /// Bounds for Content Image when item is focused
         /// </summary>
-        private Rectangle FocusedContentImageBounds;
+        private Xamarin.Forms.Rectangle FocusedContentImageBounds;
 
         /// <summary>
         /// Bounds for Play Icon
         /// </summary>
-        private Rectangle PlayIconBounds;
+        private Xamarin.Forms.Rectangle PlayIconBounds;
 
         /// <summary>
         /// Bounds for Title
         /// </summary>
-        private Rectangle TitleContainerBounds;
+        private Xamarin.Forms.Rectangle TitleContainerBounds;
 
         /// <summary>
         /// An EventHandler for focus event of item
@@ -176,9 +176,9 @@ namespace TVMediaHub.Tizen.Views
         /// </summary>
         private void InitializeLabelSlide()
         {
-            ContentTitle.SetValue(SlideEffect.SlideModeProperty, SlideMode.Always);
-            ContentTitle.SetValue(SlideEffect.SlideStyleProperty, SlideStyle.Long);
-            ContentTitle.SetValue(SlideEffect.HasSlideProperty, false);
+            TextSlideEffect.SetIsAlwaysOn(ContentTitle, true);
+            TextSlideEffect.SetMode(ContentTitle, TextSlideMode.Long); ;
+            TextSlideEffect.SetIsTextSliding(ContentTitle, false);
 
             ContentTitle.PropertyChanged += SetSlideDuration;
         }
@@ -194,7 +194,8 @@ namespace TVMediaHub.Tizen.Views
             if (e.PropertyName.Equals("Width"))
             {
                 double slideDuration = ContentTitle.Width * 12000 / 480;
-                ContentTitle.SetValue(SlideEffect.SlideDurationProperty, slideDuration);
+                TextSlideEffect.SetDuration(ContentTitle, (int)slideDuration);
+
                 ContentTitle.PropertyChanged -= SetSlideDuration;
             }
         }
@@ -214,17 +215,17 @@ namespace TVMediaHub.Tizen.Views
             int h5 = SizeUtils.GetHeightSize(5);
             int w5 = SizeUtils.GetWidthSize(5);
 
-            NormalShadowBounds = new Rectangle(w12, h12, SizeUtils.GetWidthSize(448), SizeUtils.GetHeightSize(308));
-            FocusedShadowBounds = new Rectangle(w0, h0, SizeUtils.GetWidthSize(472), SizeUtils.GetHeightSize(332));
-            FocusedBounds = new Rectangle(SizeUtils.GetWidthSize(64), SizeUtils.GetHeightSize(64), w344, h204);
-            NormalBounds = new Rectangle(SizeUtils.GetWidthSize(76), SizeUtils.GetHeightSize(76), SizeUtils.GetWidthSize(320), SizeUtils.GetHeightSize(180));
+            NormalShadowBounds = new Xamarin.Forms.Rectangle(w12, h12, SizeUtils.GetWidthSize(448), SizeUtils.GetHeightSize(308));
+            FocusedShadowBounds = new Xamarin.Forms.Rectangle(w0, h0, SizeUtils.GetWidthSize(472), SizeUtils.GetHeightSize(332));
+            FocusedBounds = new Xamarin.Forms.Rectangle(SizeUtils.GetWidthSize(64), SizeUtils.GetHeightSize(64), w344, h204);
+            NormalBounds = new Xamarin.Forms.Rectangle(SizeUtils.GetWidthSize(76), SizeUtils.GetHeightSize(76), SizeUtils.GetWidthSize(320), SizeUtils.GetHeightSize(180));
 
-            NormalContentImageBounds = new Rectangle(-w12, -h12, w344, h204);
-            FocusedContentImageBounds = new Rectangle(w0, h0, w344, h204);
+            NormalContentImageBounds = new Xamarin.Forms.Rectangle(-w12, -h12, w344, h204);
+            FocusedContentImageBounds = new Xamarin.Forms.Rectangle(w0, h0, w344, h204);
 
-            PlayIconBounds = new Rectangle(SizeUtils.GetWidthSize(208), SizeUtils.GetHeightSize(126), SizeUtils.GetWidthSize(80), SizeUtils.GetHeightSize(80));
+            PlayIconBounds = new Xamarin.Forms.Rectangle(SizeUtils.GetWidthSize(208), SizeUtils.GetHeightSize(126), SizeUtils.GetWidthSize(80), SizeUtils.GetHeightSize(80));
 
-            TitleContainerBounds = new Rectangle(SizeUtils.GetWidthSize(94), SizeUtils.GetHeightSize(214), SizeUtils.GetWidthSize(284), SizeUtils.GetHeightSize(30) * 1.3);
+            TitleContainerBounds = new Xamarin.Forms.Rectangle(SizeUtils.GetWidthSize(94), SizeUtils.GetHeightSize(214), SizeUtils.GetWidthSize(284), SizeUtils.GetHeightSize(30) * 1.3);
 
             WidthRequest = SizeUtils.GetWidthSize(472);
             HeightRequest = SizeUtils.GetHeightSize(332);
@@ -303,7 +304,7 @@ namespace TVMediaHub.Tizen.Views
             Easing easing = new Easing(EasingFunction.EasyIn2);
             this.AbortAnimation("TextSliding");
             this.AbortAnimation("FocusAnimation");
-            ContentTitle.SetValue(SlideEffect.HasSlideProperty, false);
+            TextSlideEffect.SetIsTextSliding(ContentTitle, false);
 
             BgDimImage.Opacity = 0;
             ContentImage.ScaleTo(1.0, 167, easing);
@@ -340,7 +341,7 @@ namespace TVMediaHub.Tizen.Views
                 {
                     if (!IsCanceled)
                     {
-                        ContentTitle.SetValue(SlideEffect.HasSlideProperty, true);
+                        TextSlideEffect.SetIsTextSliding(ContentTitle, true);
                     }
                 });
 
index 8ef7fe9..3541565 100755 (executable)
@@ -262,7 +262,7 @@ namespace TVMediaHub.Tizen.Views
                         playerInstance.Unprepare();
                         playerDisplayInstance = new Display((MediaView)mediaView.NativeView);
                         playerInstance.Display = playerDisplayInstance;
-                        videoMediaSource = new MediaUriSource(CurrentVideo.MediaContentInformation.FilePath);
+                        videoMediaSource = new MediaUriSource(CurrentVideo.MediaContentInformation.Path);
                         playerInstance.SetSource(videoMediaSource);
                     }
                     catch (Exception ex)
@@ -472,7 +472,7 @@ namespace TVMediaHub.Tizen.Views
                 }
             };
 
-            videoMediaSource = new MediaUriSource(CurrentVideo.MediaContentInformation.FilePath);
+            videoMediaSource = new MediaUriSource(CurrentVideo.MediaContentInformation.Path);
             playerInstance.SetSource(videoMediaSource);
         }
 
index 95e95f8..972e258 100755 (executable)
@@ -709,10 +709,10 @@ namespace TVMediaHub.Tizen.Views
             {
                 case VideoContextPopupItem.FileInfo:
                     string message = "File name  : " + info.MediaContentInformation.Title + "\n";
-                    message += "File size : " + info.MediaContentInformation.Size + "\n";
+                    message += "File size : " + info.MediaContentInformation.FileSize + "\n";
                     message += "File format : " + info.MediaContentInformation.MimeType + "\n";
-                    message += "File size : " + info.MediaContentInformation.Size + "\n";
-                    message += "File path : " + info.MediaContentInformation.FilePath;
+                    message += "File size : " + info.MediaContentInformation.FileSize + "\n";
+                    message += "File path : " + info.MediaContentInformation.Path;
 
                     await DisplayAlert("File Information", message, "Close");
                     break;
index 2b72c9c..d4989bb 100755 (executable)
Binary files a/TVMediaHub/TVMediaHub.Tizen/bin/Debug/TVMediaHub.Tizen.tpk and b/TVMediaHub/TVMediaHub.Tizen/bin/Debug/TVMediaHub.Tizen.tpk differ
index 78bee71..a573d2a 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest package="org.tizen.xamediahub" version="1.0.0" api-version="3.0" xmlns="http://tizen.org/ns/packages">
   <profile name="tv" />
-  <ui-application appid="org.tizen.xamediahub" exec="xamediahub.exe" multiple="false" nodisplay="false" taskmanage="true" splash-screen-display="true" type="dotnet" launch_mode="single">
+  <ui-application appid="org.tizen.xamediahub" exec="TVMediaHub.Tizen.exe" multiple="false" nodisplay="false" taskmanage="true" splash-screen-display="true" type="dotnet" launch_mode="single">
     <label>MediaHub</label>
     <icon>xamediahub.png</icon>
   </ui-application>