Library: filter by file properties (quality, codec, HDR, DV, language)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 20:22:06 +02:00
co-authored by Claude Sonnet 5.5
parent a7d74e2097
commit b34f88ef3e
12 changed files with 564 additions and 45 deletions
+16
View File
@@ -148,3 +148,19 @@ func TestEpisodesAndReleaseQueries(t *testing.T) {
}
}
}
func TestEpisodeFiles(t *testing.T) {
c := newTestClient(t, func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/api/v3/episodefile" || r.URL.Query().Get("seriesId") != "4" {
t.Errorf("unexpected request %s", r.URL)
}
w.Write([]byte(`[{"size":5,"quality":{"quality":{"name":"WEBDL-1080p","resolution":1080}},"mediaInfo":{"videoCodec":"x264"}}]`))
})
files, err := c.EpisodeFiles(context.Background(), 4)
if err != nil || len(files) != 1 {
t.Fatalf("files=%v err=%v", files, err)
}
if a := files[0].Attrs(); a.Resolution != 1080 || a.Codec != "x264" {
t.Errorf("attrs = %+v", a)
}
}