예제 #1
0
        private async Task<bool> LoadCreditsForMovieAsync(Movie movie)
        {
            var response = await _restConnection.MakeRequestAsync<Credits, object>(Method.Get,
                ResponseType.Json, PlexResources.TmdbBaseUrl,
                string.Format(PlexResources.TmdbCredits, movie.Id, _apiKey),
                timeout: 30000);

            if (response == null || response.ResponseObject == null)
                return false;

            movie.Credits = response.ResponseObject;

            PopulateImagePaths(movie.Credits);

            return true;
        }
예제 #2
0
 internal static Movie CloneMovie(Movie movie)
 {
     return JsonConvert.DeserializeObject<Movie>(JsonConvert.SerializeObject(movie));
 }