/// <summary> /// Stop playing a movie /// </summary> private void StopPlayingMovie() { Logger.Info( $"Stop playing movie: {Movie.Title}."); IsDownloadingMovie = false; DownloadMovie.StopDownloadingMovie(); }
/// <summary> /// Register commands /// </summary> private void RegisterCommands() { LoadMovieCommand = new RelayCommand <MovieShort>(async movie => { await LoadMovieAsync(movie); }); PlayMovieCommand = new RelayCommand(() => { IsDownloadingMovie = true; DownloadMovie.LoadMovie(Movie); }); PlayTrailerCommand = new RelayCommand(async() => { IsPlayingTrailer = true; IsTrailerLoading = true; await Trailer.LoadTrailerAsync(Movie, _cancellationLoadingTrailerToken.Token); IsTrailerLoading = false; }); StopLoadingTrailerCommand = new RelayCommand(StopLoadingTrailer); }
/// <summary> /// Stop playing a movie /// </summary> private void StopPlayingMovie() { IsDownloadingMovie = false; DownloadMovie?.Cleanup(); DownloadMovie = null; }