mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-02-28 21:19:42 +00:00
Merge 792588c95e into 1d0b7e383a
This commit is contained in:
commit
1437913539
1 changed files with 8 additions and 0 deletions
|
|
@ -518,6 +518,14 @@ class Book extends Model {
|
|||
|
||||
const existingSeries = this.series.find((se) => se.name.toLowerCase() === seriesObj.name.toLowerCase())
|
||||
if (existingSeries) {
|
||||
// Update series name if casing differs (e.g., "example series" -> "Example Series")
|
||||
if (existingSeries.name !== seriesObj.name) {
|
||||
existingSeries.name = seriesObj.name
|
||||
existingSeries.nameIgnorePrefix = getTitleIgnorePrefix(seriesObj.name)
|
||||
await existingSeries.save()
|
||||
hasUpdates = true
|
||||
Logger.debug(`[Book] "${this.title}" Updated series name casing to "${seriesObj.name}"`)
|
||||
}
|
||||
if (existingSeries.bookSeries.sequence !== seriesObjSequence) {
|
||||
existingSeries.bookSeries.sequence = seriesObjSequence
|
||||
await existingSeries.bookSeries.save()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue