From 329fa312621ee695343360b8676c516f2b8ef2c5 Mon Sep 17 00:00:00 2001 From: Kashi754 Date: Wed, 15 Apr 2026 18:16:56 +0900 Subject: [PATCH 1/3] Fix broken waifu.im image and tag search --- dots/.config/quickshell/ii/services/Booru.qml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/dots/.config/quickshell/ii/services/Booru.qml b/dots/.config/quickshell/ii/services/Booru.qml index 090476b9f..b4064058d 100644 --- a/dots/.config/quickshell/ii/services/Booru.qml +++ b/dots/.config/quickshell/ii/services/Booru.qml @@ -190,19 +190,19 @@ Singleton { "waifu.im": { "name": "waifu.im", "url": "https://waifu.im", - "api": "https://api.waifu.im/search", + "api": "https://api.waifu.im/images", "description": Translation.tr("Waifus only | Excellent quality, limited quantity"), "mapFunc": (response) => { - response = response.images + response = response.items return response.map(item => { return { - "id": item.image_id, + "id": item.id, "width": item.width, "height": item.height, "aspect_ratio": item.width / item.height, "tags": item.tags.map(tag => {return tag.name}).join(" "), - "rating": item.is_nsfw ? "e" : "s", - "is_nsfw": item.is_nsfw, + "rating": item.isNsfw ? "e" : "s", + "is_nsfw": item.isNsfw, "md5": item.md5, "preview_url": item.sample_url ?? item.url, // preview_url just says access denied (maybe i fucked up and sent too many requests idk) "sample_url": item.url, @@ -212,10 +212,9 @@ Singleton { } }) }, - "tagSearchTemplate": "https://api.waifu.im/tags", + "tagSearchTemplate": "https://api.waifu.im/tags?Name={{query}}", "tagMapFunc": (response) => { - return [...response.versatile.map(item => {return {"name": item}}), - ...response.nsfw.map(item => {return {"name": item}})] + return response.items.map(item => {return {"name": item.name}}) } }, "t.alcy.cc": { @@ -332,7 +331,7 @@ Singleton { tagsArray.forEach(tag => { params.push("included_tags=" + encodeURIComponent(tag)); }); - params.push("limit=" + Math.min(limit, 30)) // Only admin can do > 30 + params.push("PageSize=" + Math.min(limit, 30)) // Only admin can do > 30 params.push("is_nsfw=" + (nsfw ? "null" : "false")) // null is random } else if (currentProvider === "t.alcy.cc") { From 4eef9ea18e44b76cc2fa7b97bdccc36490df5677 Mon Sep 17 00:00:00 2001 From: Kashi754 Date: Tue, 21 Apr 2026 19:23:21 +0900 Subject: [PATCH 2/3] Fix still tags not being applied to search request. --- dots/.config/quickshell/ii/services/Booru.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dots/.config/quickshell/ii/services/Booru.qml b/dots/.config/quickshell/ii/services/Booru.qml index b4064058d..187d047fc 100644 --- a/dots/.config/quickshell/ii/services/Booru.qml +++ b/dots/.config/quickshell/ii/services/Booru.qml @@ -329,10 +329,10 @@ Singleton { else if (currentProvider === "waifu.im") { var tagsArray = tagString.split(" "); tagsArray.forEach(tag => { - params.push("included_tags=" + encodeURIComponent(tag)); + params.push("IncludedTags=" + encodeURIComponent(tag.toLowerCase())); }); params.push("PageSize=" + Math.min(limit, 30)) // Only admin can do > 30 - params.push("is_nsfw=" + (nsfw ? "null" : "false")) // null is random + params.push("IsNsfw=" + (nsfw ? "All" : "False")) // null is random } else if (currentProvider === "t.alcy.cc") { url += tagString From aa044b456349cd10954cd2c30b51b90c4a020c57 Mon Sep 17 00:00:00 2001 From: Minh <97237370+end-4@users.noreply.github.com> Date: Sun, 24 May 2026 23:45:15 +0200 Subject: [PATCH 3/3] fix source url safe access --- dots/.config/quickshell/ii/services/Booru.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dots/.config/quickshell/ii/services/Booru.qml b/dots/.config/quickshell/ii/services/Booru.qml index 187d047fc..4cba189df 100644 --- a/dots/.config/quickshell/ii/services/Booru.qml +++ b/dots/.config/quickshell/ii/services/Booru.qml @@ -275,7 +275,7 @@ Singleton { property var currentProvider: Persistent.states.booru.provider function getWorkingImageSource(url) { - if (url.includes('pximg.net')) { + if (url?.includes('pximg.net')) { return `https://www.pixiv.net/en/artworks/${url.substring(url.lastIndexOf('/') + 1).replace(/_p\d+\.(png|jpg|jpeg|gif)$/, '')}`; } return url;