mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-30 14:49:47 +02:00
Handle audio probes that don't return any tags
This commit is contained in:
parent
b219756cb7
commit
511386e80a
1 changed files with 3 additions and 3 deletions
|
@ -52,7 +52,7 @@ data class AudioProbeFormat(
|
||||||
val duration:Double,
|
val duration:Double,
|
||||||
val size:Long,
|
val size:Long,
|
||||||
val bit_rate:Double,
|
val bit_rate:Double,
|
||||||
val tags:AudioProbeFormatTags
|
val tags:AudioProbeFormatTags?
|
||||||
)
|
)
|
||||||
|
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
@ -63,8 +63,8 @@ class AudioProbeResult (
|
||||||
|
|
||||||
val duration get() = format.duration
|
val duration get() = format.duration
|
||||||
val size get() = format.size
|
val size get() = format.size
|
||||||
val title get() = format.tags.title ?: format.filename.split("/").last()
|
val title get() = format.tags?.title ?: format.filename.split("/").last()
|
||||||
val artist get() = format.tags.artist ?: ""
|
val artist get() = format.tags?.artist ?: ""
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
fun getBookChapters(): List<BookChapter> {
|
fun getBookChapters(): List<BookChapter> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue