feat: add description field to allanime provider show

This commit is contained in:
2026-06-30 21:24:14 +02:00
parent 86ba058825
commit 5e12a496e7
2 changed files with 32 additions and 3 deletions

View File

@@ -35,7 +35,7 @@ func TestDirectSequelsReturnsOnlyPlayableSequels(t *testing.T) {
func TestGetProviderShowKeepsOnlyPositiveIntegerEpisodes(t *testing.T) {
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
_, _ = w.Write([]byte(`{"data":{"show":{"_id":"season-2","name":"Example Season 2","englishName":"Example Season 2","malId":"42","status":"Finished","episodeCount":"2","availableEpisodesDetail":{"sub":["2","1","0","1.5"],"dub":["1"],"raw":[]}}}}`))
_, _ = w.Write([]byte(`{"data":{"show":{"_id":"season-2","name":"Example Season 2","englishName":"Example Season 2","description":"A useful<br><i>synopsis</i> &amp; summary.","malId":"42","status":"Finished","episodeCount":"2","availableEpisodesDetail":{"sub":["2","1","0","1.5"],"dub":["1"],"raw":[]}}}}`))
}))
defer server.Close()
@@ -50,6 +50,9 @@ func TestGetProviderShowKeepsOnlyPositiveIntegerEpisodes(t *testing.T) {
if got.MalID != 42 || len(got.SubEpisodes) != 2 || len(got.DubEpisodes) != 1 {
t.Fatalf("GetProviderShow = %+v", got)
}
if got.Description != "A useful synopsis & summary." {
t.Fatalf("Description = %q", got.Description)
}
}
func TestSeasonalShowsReturnsPlayableTVAnime(t *testing.T) {