static void RemoveMovieImagesFromCache(TmdbMovieImages images) { if (images != null) { Movies.RemoveAll(m => m.Id == images.Id); } }
static void AddMovieImagesToCache(TmdbMovieImages images) { if (images != null) { images.RequestAge = DateTime.Now.ToString(); Movies.Add(images); } }
public static string GetMoviePosterUrl(TmdbMovieImages images) { if (images == null || images.Posters == null) return null; var moviePoster = images.Posters.LocalisedImage(); if (moviePoster == null) return null; // return the desired resolution return TraktSettings.TmdbConfiguration.Images.BaseUrl + TraktSettings.TmdbPreferredPosterSize + moviePoster.FilePath; }
public static string GetMoviePosterFilename(TmdbMovieImages images) { if (images == null || images.Posters == null) return null; var moviePoster = images.Posters.LocalisedImage(); if (moviePoster == null) return null; // create filename based on desired resolution return Path.Combine(Config.GetFolder(Config.Dir.Thumbs), @"Trakt\Movies\Posters\") + images.Id + "_" + TraktSettings.TmdbPreferredPosterSize + "_" + moviePoster.FilePath.TrimStart('/'); }
public static string GetMovieBackdropUrl(TmdbMovieImages images) { if (images == null || images.Backdrops == null) return null; var movieBackdrop = images.Backdrops.FirstOrDefault(); if (movieBackdrop == null) return null; // return the desired resolution return TraktSettings.TmdbConfiguration.Images.BaseUrl + (TraktSettings.DownloadFullSizeFanart ? "original" : TraktSettings.TmdbPreferredBackdropSize) + movieBackdrop.FilePath; }
public static string GetMovieBackdropFilename(TmdbMovieImages images) { if (images == null || images.Backdrops == null) return null; var movieBackdrop = images.Backdrops.FirstOrDefault(); if (movieBackdrop == null) return null; // create filename based on desired resolution return Path.Combine(Config.GetFolder(Config.Dir.Thumbs), @"Trakt\Movies\Backdrops\") + images.Id + "_" + (TraktSettings.DownloadFullSizeFanart ? "original" : TraktSettings.TmdbPreferredBackdropSize) + "_" + movieBackdrop.FilePath.TrimStart('/'); }