Added more tmdb fields to cache system
This commit is contained in:
@@ -8,5 +8,10 @@ namespace AnimeAnnouncer.Cache
|
||||
|
||||
public int LatestSeasonNumber { get; set; }
|
||||
public int LastEpisodeNumber { get; set; }
|
||||
public string? PosterPath { get; internal set; }
|
||||
public string? BackdropPath { get; internal set; }
|
||||
public string? LatestSeasonPosterPath { get; internal set; }
|
||||
public string? LatestSeasonOverview { get; internal set; }
|
||||
public double VoteAverage { get; internal set; }
|
||||
}
|
||||
}
|
||||
@@ -140,6 +140,11 @@ namespace AnimeAnnouncer
|
||||
_ = tmdbCache.SetCacheItem($"ShowCache-{title}", new TMDBCacheItem()
|
||||
{
|
||||
Title = title,
|
||||
PosterPath = showResult.PosterPath.Length > 0 ? $"https://image.tmdb.org/t/p/original{showResult.PosterPath}" : String.Empty,
|
||||
BackdropPath = showResult.BackdropPath.Length > 0 ? $"https://image.tmdb.org/t/p/original{showResult.BackdropPath}" : String.Empty,
|
||||
LatestSeasonPosterPath = latestSeason.PosterPath.Length > 0 ? $"https://image.tmdb.org/t/p/original{latestSeason.PosterPath}" : String.Empty,
|
||||
LatestSeasonOverview = latestSeason.Overview,
|
||||
VoteAverage = showResult.VoteAverage,
|
||||
ShowID = supposedShowId,
|
||||
LatestSeasonNumber = latestSeason.SeasonNumber,
|
||||
LastEpisodeNumber = latestSeason.EpisodeCount
|
||||
|
||||
Reference in New Issue
Block a user