mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-29 14:28:34 +02:00
New data model Book media type contains Audiobooks updates
This commit is contained in:
parent
1dde02b170
commit
c4eeb1cfb7
30 changed files with 347 additions and 247 deletions
|
@ -27,7 +27,16 @@ function checkIsALastName(name) {
|
|||
return false
|
||||
}
|
||||
|
||||
module.exports = (nameString) => {
|
||||
// Handle name already in First Last format and return Last, First
|
||||
module.exports.nameToLastFirst = (firstLast) => {
|
||||
var nameObj = parseName(firstLast)
|
||||
if (!nameObj.last_name) return nameObj.first_name
|
||||
else if (!nameObj.first_name) return nameObj.last_name
|
||||
return `${nameObj.last_name}, ${nameObj.first_name}`
|
||||
}
|
||||
|
||||
// Handle any name string
|
||||
module.exports.parse = (nameString) => {
|
||||
if (!nameString) return null
|
||||
|
||||
var splitNames = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue