mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-04 08:21:35 +00:00
Compare commits
2 commits
320e4dfb47
...
2f6de71a3a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f6de71a3a | ||
|
|
deb121c523 |
2 changed files with 15 additions and 1 deletions
|
|
@ -400,7 +400,9 @@ export default {
|
|||
this.$toast.warning(this.$strings.ToastTitleRequired)
|
||||
return
|
||||
}
|
||||
this.persistProvider()
|
||||
if (!this.isPodcast) {
|
||||
this.persistProvider()
|
||||
}
|
||||
this.runSearch()
|
||||
},
|
||||
async runSearch() {
|
||||
|
|
|
|||
|
|
@ -82,6 +82,13 @@ class Podcast extends Model {
|
|||
const genres = Array.isArray(payload.metadata.genres) && payload.metadata.genres.every((g) => typeof g === 'string' && g.length) ? payload.metadata.genres : []
|
||||
const tags = Array.isArray(payload.tags) && payload.tags.every((t) => typeof t === 'string' && t.length) ? payload.tags : []
|
||||
|
||||
const stringKeys = ['title', 'author', 'releaseDate', 'feedUrl', 'imageUrl', 'description', 'itunesPageUrl', 'itunesId', 'itunesArtistId', 'language', 'type']
|
||||
stringKeys.forEach((key) => {
|
||||
if (typeof payload.metadata[key] === 'number') {
|
||||
payload.metadata[key] = String(payload.metadata[key])
|
||||
}
|
||||
})
|
||||
|
||||
return this.create(
|
||||
{
|
||||
title,
|
||||
|
|
@ -205,6 +212,11 @@ class Podcast extends Model {
|
|||
if (payload.metadata) {
|
||||
const stringKeys = ['title', 'author', 'releaseDate', 'feedUrl', 'imageUrl', 'description', 'itunesPageUrl', 'itunesId', 'itunesArtistId', 'language', 'type']
|
||||
stringKeys.forEach((key) => {
|
||||
// Convert numbers to strings
|
||||
if (typeof payload.metadata[key] === 'number') {
|
||||
payload.metadata[key] = String(payload.metadata[key])
|
||||
}
|
||||
|
||||
let newKey = key
|
||||
if (key === 'type') {
|
||||
newKey = 'podcastType'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue