Inheritance: TmdbRequestAge
Example #1
0
 static void RemoveMovieImagesFromCache(TmdbMovieImages images)
 {
     if (images != null)
     {
         Movies.RemoveAll(m => m.Id == images.Id);
     }
 }
Example #2
0
 static void AddMovieImagesToCache(TmdbMovieImages images)
 {
     if (images != null)
     {
         images.RequestAge = DateTime.Now.ToString();
         Movies.Add(images);
     }
 }
Example #3
0
        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;
        }
Example #4
0
        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('/');
        }
Example #5
0
        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;
        }
Example #6
0
        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('/');
        }