mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-16 06:11:38 +00:00
Added functionality to rename book folders.
This commit is contained in:
parent
f9e6655359
commit
8ccaec3d9f
12 changed files with 652 additions and 148 deletions
|
|
@ -158,7 +158,13 @@ class BookMetadata {
|
|||
if (!this.authorName) return this.title
|
||||
return this.title + '&' + this.authorName
|
||||
}
|
||||
|
||||
get genresDisplay() {
|
||||
if (!this.genres.length) return ''
|
||||
return this.genres.join(', ')
|
||||
}
|
||||
get explicitDisplay() {
|
||||
return this.explicit ? 'Explicit' : 'Not Explicit'
|
||||
}
|
||||
hasAuthor(id) {
|
||||
return !!this.authors.find(au => au.id == id)
|
||||
}
|
||||
|
|
@ -184,7 +190,24 @@ class BookMetadata {
|
|||
if (!series.sequence) return series.name
|
||||
return `${series.name} #${series.sequence}`
|
||||
}
|
||||
|
||||
getSeriesNameDisplay(index) {
|
||||
if (this.validateSeries(index)) {
|
||||
return this.series[index].name
|
||||
} else { return null }
|
||||
}
|
||||
getSeriesSequenceDisplay(index) {
|
||||
if (this.validateSeries(index)) {
|
||||
return this.series[index].sequence
|
||||
} else { return null }
|
||||
}
|
||||
validateSeries(index) {
|
||||
if (this.series.length && index < this.series.length && index >= 0) {
|
||||
return true
|
||||
}
|
||||
else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
update(payload) {
|
||||
var json = this.toJSON()
|
||||
var hasUpdates = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue