Skip to content
Snippets Groups Projects
Verified Commit b8947e61 authored by creations's avatar creations :earth_africa:
Browse files

enable reab, fix realb,

parent 892c67f5
Branches
No related tags found
Loading
......@@ -18,9 +18,9 @@ export const booruConfig: IBooruConfigMap = {
autocomplete: "ac.rule34.xxx/autocomplete.php?q=",
},
"realbooru.com": {
enabled: false,
enabled: true,
name: "realbooru.com",
aliases: ["realbooru", "rb", "real34"],
aliases: ["realbooru", "rb", "real34", "realb"],
endpoint: "realbooru.com",
functions: booruDefaults,
autocomplete: "realbooru.com/index.php?page=autocomplete&term=",
......
......@@ -281,6 +281,9 @@ async function handler(
const parsedData: Data = data as Data;
let posts: BooruPost[] = [];
if (booruConfig.name === "realbooru.com") {
posts = parsedData.post || [];
} else {
if (parsedData.post) {
posts = [parsedData.post];
} else if (parsedData.posts) {
......@@ -288,6 +291,7 @@ async function handler(
} else {
posts = Array.isArray(data) ? (data as BooruPost[]) : [];
}
}
if (posts.length === 0) continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment