Migrate imgb64 to jimp (#163)

This commit is contained in:
Simon Lecoq
2021-03-02 01:42:04 +01:00
committed by GitHub
parent 4bbc59d3af
commit 46ef6a1532
15 changed files with 318 additions and 30 deletions

View File

@@ -100,7 +100,7 @@
next = cursor.hasNextPage
for (const {name:{full:name}, image:{medium:artwork}} of nodes) {
console.debug(`metrics/compute/${login}/plugins > anilist > processing ${name}`)
characters.push({name, artwork:artwork ? await imports.imgb64(artwork) : "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mOcOnfpfwAGfgLYttYINwAAAABJRU5ErkJggg=="})
characters.push({name, artwork:await imports.imgb64(artwork)})
}
}
catch (error) {
@@ -142,7 +142,7 @@
description:description.replace(/<br\s*\\?>/g, " "),
scores:{user:userScore, community:averageScore},
released:type === "ANIME" ? episodes : chapters,
artwork:artwork ? await imports.imgb64(artwork) : "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mOcOnfpfwAGfgLYttYINwAAAABJRU5ErkJggg==",
artwork:await imports.imgb64(artwork),
}
}