feat: add book images
This commit is contained in:
parent
b7a56263b6
commit
d15d4e00ab
6 changed files with 91 additions and 84 deletions
|
@ -6,7 +6,13 @@ module.exports = async function () {
|
|||
// noinspection JSCheckFunctionSignatures
|
||||
const asset = new AssetCache('books_data')
|
||||
if (asset.isCacheValid('1h')) return await asset.getCachedValue()
|
||||
const res = await extract(url)
|
||||
const res = await extract(url, {
|
||||
getExtraEntryFields: (feedEntry) => {
|
||||
return {
|
||||
image: feedEntry['oku:cover'] || 'https://cdn.coryd.dev/books/missing-book.jpg',
|
||||
}
|
||||
},
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error.message)
|
||||
})
|
||||
|
|
Reference in a new issue