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)
|
||||
})
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
|
|
Reference in a new issue