mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-24 09:49:24 +02:00
Add:Cover image cache, resize & use webp image #223
This commit is contained in:
parent
d04f3450ec
commit
ddf0fa72e8
14 changed files with 360 additions and 108 deletions
|
@ -101,4 +101,9 @@ function secondsToTimestamp(seconds, includeMs = false) {
|
|||
}
|
||||
module.exports.secondsToTimestamp = secondsToTimestamp
|
||||
|
||||
module.exports.msToTimestamp = (ms, includeMs) => secondsToTimestamp(ms / 1000, includeMs)
|
||||
module.exports.msToTimestamp = (ms, includeMs) => secondsToTimestamp(ms / 1000, includeMs)
|
||||
|
||||
module.exports.reqSupportsWebp = (req) => {
|
||||
if (!req || !req.headers || !req.headers.accept) return false
|
||||
return req.headers.accept.includes('image/webp') || req.headers.accept === '*/*'
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue