mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-12 12:21:34 +00:00
Initial transcription support
This commit is contained in:
parent
410801347c
commit
b37a863c0a
10 changed files with 227 additions and 63 deletions
|
|
@ -5,6 +5,7 @@ class AudioTrack {
|
|||
this.duration = null
|
||||
this.title = null
|
||||
this.contentUrl = null
|
||||
this.transcriptUrl = null
|
||||
this.mimeType = null
|
||||
this.codec = null
|
||||
this.metadata = null
|
||||
|
|
@ -17,6 +18,7 @@ class AudioTrack {
|
|||
duration: this.duration,
|
||||
title: this.title,
|
||||
contentUrl: this.contentUrl,
|
||||
transcriptUrl: this.transcriptUrl,
|
||||
mimeType: this.mimeType,
|
||||
codec: this.codec,
|
||||
metadata: this.metadata?.toJSON() || null
|
||||
|
|
@ -30,6 +32,7 @@ class AudioTrack {
|
|||
this.title = audioFile.metadata.filename || ''
|
||||
|
||||
this.contentUrl = `${global.RouterBasePath}/api/items/${itemId}/file/${audioFile.ino}`
|
||||
this.transcriptUrl = `${global.RouterBasePath}/api/items/${itemId}/file/${audioFile.ino}/transcript`
|
||||
this.mimeType = audioFile.mimeType
|
||||
this.codec = audioFile.codec || null
|
||||
this.metadata = audioFile.metadata.clone()
|
||||
|
|
@ -44,4 +47,4 @@ class AudioTrack {
|
|||
this.mimeType = 'application/vnd.apple.mpegurl'
|
||||
}
|
||||
}
|
||||
module.exports = AudioTrack
|
||||
module.exports = AudioTrack
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue