示例#1
0
        public async Task RefreshVideoDetails()
        {
            try
            {
                GettingVideoInfo = true;
                var response = await _vidMeClient.GetVideoAsync(Video.VideoId);

                if (response != null)
                {
                    Video = response.Video;
                    SetViewerVote(response.ViewerVote);
                }
            }
            catch (Exception ex)
            {
                Log.ErrorException("RefreshVideoDetails()", ex);
            }

            GettingVideoInfo = false;
        }
示例#2
0
        private async Task GetVideo(string videoId)
        {
            try
            {
                var response = await _vidMeClient.GetVideoAsync(videoId);

                if (response != null)
                {
                    if (Video == null)
                    {
                        Video = new VideoItemViewModel(response.Video, null);
                    }
                    else
                    {
                        Video.Video = response.Video;
                    }

                    await LoadVideoData();
                }
            }
            catch (Exception ex)
            {
            }
        }