fix: show latest discover posters

This commit is contained in:
ShukeBta
2026-06-24 20:17:38 +08:00
parent e5b5ecce93
commit a7c8d46589
7 changed files with 103 additions and 12 deletions
+4
View File
@@ -178,6 +178,10 @@ func tmdbDiscoverPath(key string) string {
return "/trending/movie/day"
case "tmdb_trending_week", "trending_week":
return "/trending/movie/week"
case "tmdb_latest_movie", "latest_movie":
return "/movie/now_playing"
case "tmdb_latest_tv", "latest_tv":
return "/tv/on_the_air"
case "tmdb_popular_movie", "popular_movie":
return "/movie/popular"
case "tmdb_popular_tv", "popular_tv":
+15
View File
@@ -83,6 +83,21 @@ func TestDiscoverWarmArtworkNoImageProxyIsNoop(t *testing.T) {
}
}
func TestTMDbDiscoverPathIncludesLatestSections(t *testing.T) {
cases := map[string]string{
"tmdb_latest_movie": "/movie/now_playing",
"latest_movie": "/movie/now_playing",
"tmdb_latest_tv": "/tv/on_the_air",
"latest_tv": "/tv/on_the_air",
"tmdb_upcoming_movie": "/movie/upcoming",
}
for key, want := range cases {
if got := tmdbDiscoverPath(key); got != want {
t.Fatalf("tmdbDiscoverPath(%q) = %q, want %q", key, got, want)
}
}
}
func waitForDiscoverArtworkCache(t *testing.T, calls *int32, wantCalls int32, cachePath, raw string) {
t.Helper()
deadline := time.Now().Add(2 * time.Second)