mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-09 10:51:37 +00:00
Add authorNames columns and indices to LibraryItem model
This commit is contained in:
parent
e0e1d2d380
commit
edccb7241b
1 changed files with 13 additions and 1 deletions
|
|
@ -77,6 +77,10 @@ class LibraryItem extends Model {
|
||||||
this.title // Only used for sorting
|
this.title // Only used for sorting
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
this.titleIgnorePrefix // Only used for sorting
|
this.titleIgnorePrefix // Only used for sorting
|
||||||
|
/** @type {string} */
|
||||||
|
this.authorNamesFirstLast // Only used for sorting
|
||||||
|
/** @type {string} */
|
||||||
|
this.authorNamesLastFirst // Only used for sorting
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -683,7 +687,9 @@ class LibraryItem extends Model {
|
||||||
libraryFiles: DataTypes.JSON,
|
libraryFiles: DataTypes.JSON,
|
||||||
extraData: DataTypes.JSON,
|
extraData: DataTypes.JSON,
|
||||||
title: DataTypes.STRING,
|
title: DataTypes.STRING,
|
||||||
titleIgnorePrefix: DataTypes.STRING
|
titleIgnorePrefix: DataTypes.STRING,
|
||||||
|
authorNamesFirstLast: DataTypes.STRING,
|
||||||
|
authorNamesLastFirst: DataTypes.STRING
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sequelize,
|
sequelize,
|
||||||
|
|
@ -710,6 +716,12 @@ class LibraryItem extends Model {
|
||||||
{
|
{
|
||||||
fields: ['libraryId', 'mediaType', { name: 'titleIgnorePrefix', collate: 'NOCASE' }]
|
fields: ['libraryId', 'mediaType', { name: 'titleIgnorePrefix', collate: 'NOCASE' }]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fields: ['libraryId', 'mediaType', { name: 'authorNamesFirstLast', collate: 'NOCASE' }]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fields: ['libraryId', 'mediaType', { name: 'authorNamesLastFirst', collate: 'NOCASE' }]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
fields: ['libraryId', 'mediaId', 'mediaType']
|
fields: ['libraryId', 'mediaId', 'mediaType']
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue