protected override async void Execute(IVideoContent content) { var status = _videoCacheManager.GetVideoCacheStatus(content.VideoId); if (status is null) { return; } if (status is VideoCacheStatus.Completed) { var confirmed = await _dialogService.ShowMessageDialog( "ConfirmCacheRemoveContent".Translate(content.Title), $"ConfirmCacheRemoveTitle".Translate(), acceptButtonText : "Delete".Translate(), "Cancel".Translate() ); if (confirmed) { await _videoCacheManager.CancelCacheRequestAsync(content.VideoId); } } else { await _videoCacheManager.CancelCacheRequestAsync(content.VideoId); } }
/// <summary> /// 再生処理 /// </summary> /// <returns></returns> public async Task <PlayingOrchestrateResult> CreatePlayingOrchestrateResultAsync(VideoId videoId) { #if !DEBUG if (_videoCacheManager.IsCacheDownloadAuthorized() && _videoCacheManager.GetVideoCacheStatus(videoId) == VideoCacheStatus.Completed) #else if (_videoCacheManager.GetVideoCacheStatus(videoId) == VideoCacheStatus.Completed) #endif { return(await PreperePlayWithCache(videoId)); } else { return(await PreperePlayWithOnline(videoId)); } }