상속: TmdbRequestAge
예제 #1
0
 static void RemoveSeasonImagesFromCache(TmdbSeasonImages images, int season)
 {
     if (images != null)
     {
         Seasons.RemoveAll(s => s.Id == images.Id && s.Season == season);
     }
 }
예제 #2
0
        public static string GetSeasonPosterUrl(TmdbSeasonImages images)
        {
            if (images == null || images.Posters == null)
                return null;

            var seasonThumb = images.Posters.LocalisedImage();
            if (seasonThumb == null)
                return null;

            // return the desired resolution
            return TraktSettings.TmdbConfiguration.Images.BaseUrl + TraktSettings.TmdbPreferredPosterSize + seasonThumb.FilePath;
        }
예제 #3
0
 static void AddSeasonImagesToCache(TmdbSeasonImages images, int? id, int season)
 {
     if (images != null)
     {
         // the id on the request (show) is different on the response (season)
         images.RequestAge = DateTime.Now.ToString();
         images.Season = season;
         images.Id = id;
         Seasons.Add(images);
     }
 }
예제 #4
0
        public static string GetSeasonPosterFilename(TmdbSeasonImages images)
        {
            if (images == null || images.Posters == null)
                return null;

            var seasonThumb = images.Posters.LocalisedImage();
            if (seasonThumb == null)
                return null;

            // create filename based on desired resolution
            return Path.Combine(Config.GetFolder(Config.Dir.Thumbs), @"Trakt\Seasons\Thumbs\") +
                                images.Id + "_" + TraktSettings.TmdbPreferredPosterSize + "_" + seasonThumb.FilePath.TrimStart('/');
        }