mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-01 21:15:00 +02:00
Improve track order detection, allow for excluding audio files from tracklist
This commit is contained in:
parent
197012e662
commit
e566c6c9d5
10 changed files with 114 additions and 37 deletions
|
@ -29,6 +29,7 @@ class AudioFile {
|
|||
|
||||
this.manuallyVerified = false
|
||||
this.invalid = false
|
||||
this.exclude = false
|
||||
this.error = null
|
||||
|
||||
if (data) {
|
||||
|
@ -49,6 +50,7 @@ class AudioFile {
|
|||
trackNumFromFilename: this.trackNumFromFilename,
|
||||
manuallyVerified: !!this.manuallyVerified,
|
||||
invalid: !!this.invalid,
|
||||
exclude: !!this.exclude,
|
||||
error: this.error || null,
|
||||
format: this.format,
|
||||
duration: this.duration,
|
||||
|
@ -76,6 +78,7 @@ class AudioFile {
|
|||
this.addedAt = data.addedAt
|
||||
this.manuallyVerified = !!data.manuallyVerified
|
||||
this.invalid = !!data.invalid
|
||||
this.exclude = !!data.exclude
|
||||
this.error = data.error || null
|
||||
|
||||
this.trackNumFromMeta = data.trackNumFromMeta || null
|
||||
|
@ -112,6 +115,7 @@ class AudioFile {
|
|||
|
||||
this.manuallyVerified = !!data.manuallyVerified
|
||||
this.invalid = !!data.invalid
|
||||
this.exclude = !!data.exclude
|
||||
this.error = data.error || null
|
||||
|
||||
this.format = data.format
|
||||
|
@ -131,6 +135,10 @@ class AudioFile {
|
|||
this.tagTrack = data.file_tag_track || null
|
||||
}
|
||||
|
||||
clone() {
|
||||
return new AudioFile(this.toJSON())
|
||||
}
|
||||
|
||||
syncFile(newFile) {
|
||||
var hasUpdates = false
|
||||
var keysToSync = ['path', 'fullPath', 'ext', 'filename']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue