feat: add book images

This commit is contained in:
Cory Dransfeldt 2023-06-03 20:01:05 -07:00
parent b7a56263b6
commit d15d4e00ab
No known key found for this signature in database
6 changed files with 91 additions and 84 deletions

View file

@ -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)
})

View file

@ -13,8 +13,10 @@
"instapaper": "https://www.instapaper.com/p/coryd",
"letterboxd": "https://letterboxd.com/cdme",
"letterboxd-host": "https://a.ltrbxd.com",
"oku-host": "https://oku.ams3.cdn.digitaloceanspaces.com",
"trakt": "https://trakt.tv/users/cdransf",
"oku": "https://oku.club/user/cory",
"coffee": "https://www.buymeacoffee.com/cory",
"cdn-movies": "https://movies.coryd.dev"
"cdn-movies": "https://movies.coryd.dev",
"cdn-books": "https://books.coryd.dev"
}