Merge pull request #670 from linkwarden/dev

Dev
This commit is contained in:
Daniel 2024-07-25 14:24:24 -04:00 committed by GitHub
commit a82c4ef85f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -77,6 +77,8 @@ async function pdfScreenshotIndexing() {
orderBy: { id: "asc" }, orderBy: { id: "asc" },
}); });
let counter = 0;
// PDFs // PDFs
for (let link of links) { for (let link of links) {
const path = `archives/${link.collectionId}/${link.id}.pdf`; const path = `archives/${link.collectionId}/${link.id}.pdf`;
@ -88,12 +90,15 @@ async function pdfScreenshotIndexing() {
where: { id: link.id }, where: { id: link.id },
data: { pdf: path }, data: { pdf: path },
}); });
console.log(`${link.id}`);
} else {
console.log(`${link.id}`);
} }
console.log("count:", counter, "id:", link.id, "PDF");
counter++;
} }
counter = 0;
// Screenshots (PNGs) // Screenshots (PNGs)
for (let link of links) { for (let link of links) {
const path = `archives/${link.collectionId}/${link.id}.png`; const path = `archives/${link.collectionId}/${link.id}.png`;
@ -105,12 +110,15 @@ async function pdfScreenshotIndexing() {
where: { id: link.id }, where: { id: link.id },
data: { image: path }, data: { image: path },
}); });
console.log(`${link.id}`);
} else {
console.log(`${link.id}`);
} }
console.log("count:", counter, "id:", link.id, "PNG");
counter++;
} }
counter = 0;
// Screenshots (JPEGs) // Screenshots (JPEGs)
for (let link of links) { for (let link of links) {
const path = `archives/${link.collectionId}/${link.id}.jpeg`; const path = `archives/${link.collectionId}/${link.id}.jpeg`;
@ -122,10 +130,11 @@ async function pdfScreenshotIndexing() {
where: { id: link.id }, where: { id: link.id },
data: { image: path }, data: { image: path },
}); });
console.log(`${link.id}`);
} else {
console.log(`${link.id}`);
} }
console.log("count:", counter, "id:", link.id, "JPEG");
counter++;
} }
await prisma.$disconnect(); await prisma.$disconnect();