Remove recently watched video api and setPlayedAt api 29/149729/1
authorJH Choi <jjie.choi@samsung.com>
Wed, 13 Sep 2017 01:23:57 +0000 (10:23 +0900)
committerJH Choi <jjie.choi@samsung.com>
Wed, 13 Sep 2017 04:18:56 +0000 (13:18 +0900)
Change-Id: Ied73d27eda4581d047e0a155ad97665e96ac8e3d
Signed-off-by: JH Choi <jjie.choi@samsung.com>
TVMediaHub/TVMediaHub.Tizen/Models/VideoProvider.cs
TVMediaHub/TVMediaHub.Tizen/ViewModels/VideoTabViewModel.cs
TVMediaHub/TVMediaHub.Tizen/Views/VideoPlayer.xaml.cs

index 0c3cd2b89ec294454cbde6eb548836f8355642a7..d08a0aa591b59b6190067f8ec2006a72867f04ea 100755 (executable)
@@ -59,54 +59,6 @@ namespace TVMediaHub.Tizen.Models
             }
         }
 
-        /// <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;
index dce44a80d6b9cc910daa3d3187727b20d7dbb7d2..59f04b0a6c2956a6fcaa2940c3a1debeb15099c2 100755 (executable)
@@ -55,9 +55,6 @@ namespace TVMediaHub.Tizen.ViewModels
             }
         }
 
-        // TODO : Change to MediaInformationEx
-        public string RecentlyWatchedContent { get; private set; }
-
         /// <summary>
         /// Gets or sets the list of video group item
         /// </summary>
@@ -434,13 +431,6 @@ namespace TVMediaHub.Tizen.ViewModels
             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>
@@ -510,15 +500,6 @@ namespace TVMediaHub.Tizen.ViewModels
             }
         }
 
-        /// <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>
index 497007dc13f0a288ae2366b54b3345355f689205..51114180c9c98f1b99bebf5c2d79defe0656d310 100755 (executable)
@@ -591,8 +591,6 @@ namespace TVMediaHub.Tizen.Views
             }
 
             DbgPort.D("Play!!");
-
-            VideoTabViewModelLocator.ViewModel.SetPlayedAt(CurrentVideo);
         }
 
         /// <summary>