mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-05 04:56:37 +08:00
fix: show latest discover posters
This commit is contained in:
@@ -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":
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user