mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-19 11:21:27 +02:00
Fix Book/Podcast updateFromRequest to support null values in string fields #3938
This commit is contained in:
@@ -202,8 +202,9 @@ class Podcast extends Model {
|
||||
} else if (key === 'itunesPageUrl') {
|
||||
newKey = 'itunesPageURL'
|
||||
}
|
||||
if (typeof payload.metadata[key] === 'string' && payload.metadata[key] !== this[newKey]) {
|
||||
this[newKey] = payload.metadata[key]
|
||||
if ((typeof payload.metadata[key] === 'string' || payload.metadata[key] === null) && payload.metadata[key] !== this[newKey]) {
|
||||
this[newKey] = payload.metadata[key] || null
|
||||
|
||||
if (key === 'title') {
|
||||
this.titleIgnorePrefix = getTitleIgnorePrefix(this.title)
|
||||
}
|
||||
|
Reference in New Issue
Block a user