fix: missing book covers

This commit is contained in:
Cory Dransfeldt 2023-06-25 11:23:38 -07:00
parent 6a7015a798
commit 7fe43a0297
No known key found for this signature in database

View file

@ -9,7 +9,10 @@ module.exports = async function () {
const res = await extract(url, {
getExtraEntryFields: (feedEntry) => {
return {
image: feedEntry['oku:cover'] || 'https://cdn.coryd.dev/books/missing-book.jpg',
image:
feedEntry['oku:cover'] ||
`https://cdn.coryd.dev/books/${feedEntry.title.replace(/\s+/g, '-').toLowerCase()}.jpg` ||
'https://cdn.coryd.dev/books/missing-book.jpg',
}
},
})