mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-30 06:39:37 +02:00
Cast OpenLibrary publishYear to string #4114
This commit is contained in:
parent
607f143861
commit
e29d3a3672
1 changed files with 2 additions and 2 deletions
|
@ -66,10 +66,10 @@ class OpenLibrary {
|
||||||
}
|
}
|
||||||
|
|
||||||
parsePublishYear(doc, worksData) {
|
parsePublishYear(doc, worksData) {
|
||||||
if (doc.first_publish_year && !isNaN(doc.first_publish_year)) return doc.first_publish_year
|
if (doc.first_publish_year && !isNaN(doc.first_publish_year)) return String(doc.first_publish_year)
|
||||||
if (worksData.first_publish_date) {
|
if (worksData.first_publish_date) {
|
||||||
var year = worksData.first_publish_date.split('-')[0]
|
var year = worksData.first_publish_date.split('-')[0]
|
||||||
if (!isNaN(year)) return year
|
if (!isNaN(year)) return String(year)
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue