Fixed issue with too many tags for danbooru
This commit is contained in:
parent
b4b22d1f8a
commit
3fe8306578
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"booru": ["danbooru", "safebooru"],
|
||||
"characterTags": ["onodera_kosaki", "tohsaka_rin", "izumi_konata"],
|
||||
"tags": ["-underwear"],
|
||||
"characterTags": ["onodera_kosaki", "tohsaka_rin"],
|
||||
"miscTags": "-underwear",
|
||||
"tags": [""],
|
||||
"rating": "safe"
|
||||
}
|
||||
|
|
|
@ -15,13 +15,17 @@ export function getFromBooru() {
|
|||
if (config.rating === "safe") {
|
||||
config.tags.push("rating:safe");
|
||||
}
|
||||
|
||||
//Select a random index from the array and append the waifu to the tags
|
||||
const randWaifu = Math.floor(Math.random() * config.characterTags.length);
|
||||
config.tags.push(config.characterTags[randWaifu]);
|
||||
|
||||
//Select a random index from the array to pick which booru is being queried
|
||||
const randBooru = Math.floor(Math.random() * config.booru.length);
|
||||
if (config.booru[randBooru] === "safebooru") {
|
||||
config.tags.push(config.miscTags);
|
||||
}
|
||||
//Select a random index from the array and append the waifu to the tags
|
||||
const randWaifu = Math.floor(Math.random() * config.characterTags.length);
|
||||
|
||||
config.tags.push(config.characterTags[randWaifu]);
|
||||
|
||||
console.log(config.tags, config.booru[randBooru]);
|
||||
search(config.booru[randBooru], config.tags, {
|
||||
limit: 1,
|
||||
random: true,
|
||||
|
|
Loading…
Reference in New Issue