From 25d67e75446f918176b4745858adb7ebe28b3c61 Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Wed, 20 Sep 2023 16:59:43 +1000 Subject: [PATCH] Fix missing URL filters --- pkg/sqlite/gallery.go | 3 +++ pkg/sqlite/scene.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/pkg/sqlite/gallery.go b/pkg/sqlite/gallery.go index b95e552cfa9..41729c9ad95 100644 --- a/pkg/sqlite/gallery.go +++ b/pkg/sqlite/gallery.go @@ -900,6 +900,9 @@ func galleryIsMissingCriterionHandler(qb *GalleryStore, isMissing *string) crite return func(ctx context.Context, f *filterBuilder) { if isMissing != nil && *isMissing != "" { switch *isMissing { + case "url": + galleriesURLsTableMgr.join(f, "", "galleries.id") + f.addWhere("gallery_urls.url IS NULL") case "scenes": f.addLeftJoin("scenes_galleries", "scenes_join", "scenes_join.gallery_id = galleries.id") f.addWhere("scenes_join.gallery_id IS NULL") diff --git a/pkg/sqlite/scene.go b/pkg/sqlite/scene.go index 215c1740953..e9f1f24dd18 100644 --- a/pkg/sqlite/scene.go +++ b/pkg/sqlite/scene.go @@ -1291,6 +1291,9 @@ func sceneIsMissingCriterionHandler(qb *SceneStore, isMissing *string) criterion return func(ctx context.Context, f *filterBuilder) { if isMissing != nil && *isMissing != "" { switch *isMissing { + case "url": + scenesURLsTableMgr.join(f, "", "scenes.id") + f.addWhere("scene_urls.url IS NULL") case "galleries": qb.galleriesRepository().join(f, "galleries_join", "scenes.id") f.addWhere("galleries_join.scene_id IS NULL")