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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user