mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-04 02:05:06 +02:00
Merge remote-tracking branch 'origin/master' into auth_passportjs
This commit is contained in:
commit
226a774ab9
15 changed files with 105 additions and 90 deletions
|
@ -114,11 +114,14 @@ class Author extends Model {
|
|||
static async getOldByNameAndLibrary(authorName, libraryId) {
|
||||
const author = (await this.findOne({
|
||||
where: [
|
||||
literal(`name = '${authorName}' COLLATE NOCASE`),
|
||||
literal(`name = ':authorName' COLLATE NOCASE`),
|
||||
{
|
||||
libraryId
|
||||
}
|
||||
]
|
||||
],
|
||||
replacements: {
|
||||
authorName
|
||||
}
|
||||
}))?.getOldAuthor()
|
||||
return author
|
||||
}
|
||||
|
|
|
@ -105,11 +105,14 @@ class Series extends Model {
|
|||
static async getOldByNameAndLibrary(seriesName, libraryId) {
|
||||
const series = (await this.findOne({
|
||||
where: [
|
||||
literal(`name = '${seriesName}' COLLATE NOCASE`),
|
||||
literal(`name = ':seriesName' COLLATE NOCASE`),
|
||||
{
|
||||
libraryId
|
||||
}
|
||||
]
|
||||
],
|
||||
replacements: {
|
||||
seriesName
|
||||
}
|
||||
}))?.getOldSeries()
|
||||
return series
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue