Fix Artgrid collector matching and split ranker
build-push / docker (push) Successful in 4m16s

This commit is contained in:
AI Assistant
2026-03-13 19:31:57 +09:00
parent 5aebbef639
commit e4262613c3
6 changed files with 250 additions and 165 deletions
+14
View File
@@ -49,3 +49,17 @@ func TestCleanArtgridTitle(t *testing.T) {
t.Fatalf("expected %q, got %q", want, got)
}
}
func TestCanonicalizeArtgridLinkFromArtlist(t *testing.T) {
got := canonicalizeArtgridLink("https://artlist.io/stock-footage/clip/movie-film-moving-slowly-from-a-reel/114756")
want := "https://artgrid.io/clip/114756/movie-film-moving-slowly-from-a-reel"
if got != want {
t.Fatalf("expected %q, got %q", want, got)
}
}
func TestIsRenderableArtgridResultAcceptsArtlistCanonical(t *testing.T) {
if !isRenderableArtgridResult(SearchResult{Link: "https://artlist.io/stock-footage/clip/movie-film-moving-slowly-from-a-reel/114756"}) {
t.Fatal("expected artlist canonical clip URL to be accepted for Artgrid collector")
}
}