mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-22 03:44:28 +02:00
Avoid parsing first and last names in Chinese, Japanese and Korean languages
This commit is contained in:
parent
978c2b05f2
commit
7ef14aabed
1 changed files with 7 additions and 0 deletions
|
@ -52,6 +52,13 @@ module.exports.parse = (nameString) => {
|
||||||
}
|
}
|
||||||
if (splitNames.length) splitNames = splitNames.map((a) => a.trim())
|
if (splitNames.length) splitNames = splitNames.map((a) => a.trim())
|
||||||
|
|
||||||
|
// If names are in Chinese,Japanese and Korean languages, return as is.
|
||||||
|
if (/[\u4e00-\u9fff\u3040-\u30ff\u31f0-\u31ff]/.test(splitNames[0])) {
|
||||||
|
return {
|
||||||
|
names: splitNames
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var names = []
|
var names = []
|
||||||
|
|
||||||
// 1 name FIRST LAST
|
// 1 name FIRST LAST
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue