mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-18 19:08:13 +02:00
Remove deprecated /s/ and /ebook/ api routes
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
const Path = require('path')
|
||||
const { encodeUriPath } = require('../../utils/fileUtils')
|
||||
|
||||
class AudioTrack {
|
||||
constructor() {
|
||||
this.index = null
|
||||
@@ -22,7 +19,7 @@ class AudioTrack {
|
||||
contentUrl: this.contentUrl,
|
||||
mimeType: this.mimeType,
|
||||
codec: this.codec,
|
||||
metadata: this.metadata ? this.metadata.toJSON() : null
|
||||
metadata: this.metadata?.toJSON() || null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,8 +28,8 @@ class AudioTrack {
|
||||
this.startOffset = startOffset
|
||||
this.duration = audioFile.duration
|
||||
this.title = audioFile.metadata.filename || ''
|
||||
// TODO: Switch to /api/items/:id/file/:fileid
|
||||
this.contentUrl = Path.join(`${global.RouterBasePath}/s/item/${itemId}`, encodeUriPath(audioFile.metadata.relPath))
|
||||
|
||||
this.contentUrl = `${global.RouterBasePath}/api/items/${itemId}/file/${audioFile.ino}`
|
||||
this.mimeType = audioFile.mimeType
|
||||
this.codec = audioFile.codec || null
|
||||
this.metadata = audioFile.metadata.clone()
|
||||
|
Reference in New Issue
Block a user