mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-11-07 08:34:10 +01:00
retire unicode handling workaround for Author and Series title
This commit is contained in:
parent
549f95b259
commit
e6db1495ab
@ -1,6 +1,5 @@
|
||||
const { DataTypes, Model, where, fn, col } = require('sequelize')
|
||||
const parseNameString = require('../utils/parsers/parseNameString')
|
||||
const { asciiOnlyToLowerCase } = require('../utils/index')
|
||||
|
||||
class Author extends Model {
|
||||
constructor(values, options) {
|
||||
@ -56,7 +55,7 @@ class Author extends Model {
|
||||
static async getByNameAndLibrary(authorName, libraryId) {
|
||||
return this.findOne({
|
||||
where: [
|
||||
where(fn('lower', col('name')), asciiOnlyToLowerCase(authorName)),
|
||||
where(fn('lower', col('name')), authorName.toLowerCase()),
|
||||
{
|
||||
libraryId
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
const { DataTypes, Model, where, fn, col } = require('sequelize')
|
||||
|
||||
const { getTitlePrefixAtEnd } = require('../utils/index')
|
||||
const { asciiOnlyToLowerCase } = require('../utils/index')
|
||||
|
||||
class Series extends Model {
|
||||
constructor(values, options) {
|
||||
@ -42,7 +41,7 @@ class Series extends Model {
|
||||
static async getByNameAndLibrary(seriesName, libraryId) {
|
||||
return this.findOne({
|
||||
where: [
|
||||
where(fn('lower', col('name')), asciiOnlyToLowerCase(seriesName)),
|
||||
where(fn('lower', col('name')), seriesName.toLowerCase()),
|
||||
{
|
||||
libraryId
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user