Bookshelf updates for music tracks

This commit is contained in:
advplyr 2023-01-03 18:00:01 -06:00
parent 84d2d00a30
commit 7f5356100d
12 changed files with 139 additions and 49 deletions

View file

@ -127,7 +127,7 @@ class Book {
})
}
get duration() {
var total = 0
let total = 0
this.tracks.forEach((track) => total += track.duration)
return total
}

View file

@ -41,6 +41,7 @@ class Music {
coverPath: this.coverPath,
tags: [...this.tags],
audioFile: this.audioFile.toJSON(),
duration: this.duration,
size: this.size
}
}
@ -52,6 +53,7 @@ class Music {
coverPath: this.coverPath,
tags: [...this.tags],
audioFile: this.audioFile.toJSON(),
duration: this.duration,
size: this.size
}
}