mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-15 16:29:37 +00:00
Fix URL encoding, fix download m4b cover art
This commit is contained in:
parent
19dcb6173e
commit
75aede914f
7 changed files with 19 additions and 14 deletions
|
|
@ -240,8 +240,8 @@ class DownloadManager {
|
|||
}
|
||||
|
||||
if (shouldIncludeCover) {
|
||||
var _cover = audiobook.book.cover
|
||||
if (_cover.startsWith(Path.sep + 'local')) {
|
||||
var _cover = audiobook.book.coverFullPath
|
||||
if (!_cover && audiobook.book.cover && audiobook.book.cover.startsWith(Path.sep + 'local')) {
|
||||
_cover = Path.join(this.AudiobookPath, _cover.replace(Path.sep + 'local', ''))
|
||||
Logger.debug('Local cover url', _cover)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -140,8 +140,7 @@ class Server {
|
|||
var folder = library.folders.find(fol => fol.id === req.params.folder)
|
||||
if (!folder) return res.status(404).send('Folder not found')
|
||||
|
||||
var remainingPath = decodeURIComponent(req.params['0'])
|
||||
|
||||
var remainingPath = req.params['0']
|
||||
var fullPath = Path.join(folder.fullPath, remainingPath)
|
||||
res.sendFile(fullPath)
|
||||
})
|
||||
|
|
@ -151,8 +150,7 @@ class Server {
|
|||
var audiobook = this.audiobooks.find(ab => ab.id === req.params.id)
|
||||
if (!audiobook) return res.status(404).send('Book not found with id ' + req.params.id)
|
||||
|
||||
var remainingPath = decodeURIComponent(req.params['0'])
|
||||
|
||||
var remainingPath = req.params['0']
|
||||
var fullPath = Path.join(audiobook.fullPath, remainingPath)
|
||||
res.sendFile(fullPath)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue