summaryrefslogtreecommitdiffstats
path: root/src/api/e926
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/e926')
-rw-r--r--src/api/e926/index.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/api/e926/index.ts b/src/api/e926/index.ts
index 37d8598..8e363c9 100644
--- a/src/api/e926/index.ts
+++ b/src/api/e926/index.ts
@@ -71,6 +71,11 @@ export async function getRandomPost(query: GetPostQuery): Promise<Post> {
71 const postIndex = Math.floor(Math.random() * response.posts.length); 71 const postIndex = Math.floor(Math.random() * response.posts.length);
72 const post = response.posts[postIndex]; 72 const post = response.posts[postIndex];
73 73
74 if (config.e621.blacklist.includes(post.id)) {
75 await delay(1000);
76 return getRandomPost(query);
77 }
78
74 const isDupe = await dedupeDb.insertIfNotExists({ provider: "e926", id: post.id }); 79 const isDupe = await dedupeDb.insertIfNotExists({ provider: "e926", id: post.id });
75 80
76 if (isDupe) { 81 if (isDupe) {