Update db migration for duration, size, lastFirst, and ignore prefix columns

This commit is contained in:
advplyr 2023-07-28 18:03:31 -05:00
parent 0ca4ff4fca
commit 4dbe8d29d9
18 changed files with 777 additions and 26 deletions

View file

@ -137,8 +137,7 @@ module.exports.cleanStringForSearch = (str) => {
const getTitleParts = (title) => {
if (!title) return ['', null]
var prefixesToIgnore = global.ServerSettings.sortingPrefixes || []
prefixes = []
const prefixesToIgnore = global.ServerSettings.sortingPrefixes || []
for (const prefix of prefixesToIgnore) {
// e.g. for prefix "the". If title is "The Book" return "Book, The"
if (title.toLowerCase().startsWith(`${prefix} `)) {