mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-06-06 05:38:44 +08:00
Remove all gaelleries before sync
This commit is contained in:
@@ -128,6 +128,10 @@ export class MeiliSearchServer {
|
||||
const gmeta = await this.gmeta;
|
||||
await this.waitTask(gmeta.deleteDocument(gid));
|
||||
}
|
||||
async removeAllGallery() {
|
||||
const gmeta = await this.gmeta;
|
||||
await this.waitTask(gmeta.deleteAllDocuments());
|
||||
}
|
||||
async updateGallery(...gids: number[]) {
|
||||
const gmeta = await this.gmeta;
|
||||
const datas = gids.map((gid) => {
|
||||
|
||||
@@ -6,6 +6,7 @@ export async function update_meili_search_data(
|
||||
manager: TaskManager,
|
||||
) {
|
||||
if (!manager.meilisearch) throw Error("MeiliServer not found.");
|
||||
await manager.meilisearch.removeAllGallery();
|
||||
const progress: TaskUpdateMeiliSearchDataProgress = {
|
||||
total_gallery: 0,
|
||||
updated_gallery: 0,
|
||||
|
||||
Reference in New Issue
Block a user