mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-02-28 21:19:42 +00:00
feat: implement duplicate title normalized filter
This commit is contained in:
parent
aa85106681
commit
ead215e777
13 changed files with 276 additions and 1 deletions
|
|
@ -146,6 +146,7 @@ class Book extends Model {
|
|||
},
|
||||
title: DataTypes.STRING,
|
||||
titleIgnorePrefix: DataTypes.STRING,
|
||||
titleNormalized: DataTypes.STRING,
|
||||
subtitle: DataTypes.STRING,
|
||||
publishedYear: DataTypes.STRING,
|
||||
publishedDate: DataTypes.STRING,
|
||||
|
|
@ -407,7 +408,9 @@ class Book extends Model {
|
|||
this[key] = payload.metadata[key] || null
|
||||
|
||||
if (key === 'title') {
|
||||
const { getTitleIgnorePrefix, getNormalizedTitle } = require('../utils')
|
||||
this.titleIgnorePrefix = getTitleIgnorePrefix(this.title)
|
||||
this.titleNormalized = getNormalizedTitle(this.title)
|
||||
}
|
||||
|
||||
hasUpdates = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue