mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-04 02:05:06 +02:00
Update:Get item cover API endpoint to allow for returning the raw cover image
This commit is contained in:
parent
3ea3e55d17
commit
67db41a525
2 changed files with 12 additions and 3 deletions
|
@ -47,7 +47,7 @@ class CacheManager {
|
|||
|
||||
res.type(`image/${format}`)
|
||||
|
||||
var path = Path.join(this.CoverCachePath, `${libraryItem.id}_${width}${height ? `x${height}` : ''}`) + '.' + format
|
||||
const path = Path.join(this.CoverCachePath, `${libraryItem.id}_${width}${height ? `x${height}` : ''}`) + '.' + format
|
||||
|
||||
// Cache exists
|
||||
if (await fs.pathExists(path)) {
|
||||
|
@ -66,7 +66,7 @@ class CacheManager {
|
|||
return res.sendStatus(500)
|
||||
}
|
||||
|
||||
let writtenFile = await resizeImage(libraryItem.media.coverPath, path, width, height)
|
||||
const writtenFile = await resizeImage(libraryItem.media.coverPath, path, width, height)
|
||||
if (!writtenFile) return res.sendStatus(500)
|
||||
|
||||
// Set owner and permissions of cache image
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue