mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-02-11 12:49:40 +00:00
Merge 8321ba6291 into 626596b192
This commit is contained in:
commit
44b7b450e0
9 changed files with 126 additions and 7 deletions
|
|
@ -40,6 +40,8 @@ class Podcast extends Model {
|
|||
/** @type {string} */
|
||||
this.language
|
||||
/** @type {string} */
|
||||
this.podcastFilenameFormat
|
||||
/** @type {string} */
|
||||
this.podcastType
|
||||
/** @type {boolean} */
|
||||
this.explicit
|
||||
|
|
@ -102,6 +104,7 @@ class Podcast extends Model {
|
|||
itunesId: typeof payload.metadata.itunesId === 'string' ? payload.metadata.itunesId : null,
|
||||
itunesArtistId: typeof payload.metadata.itunesArtistId === 'string' ? payload.metadata.itunesArtistId : null,
|
||||
language: typeof payload.metadata.language === 'string' ? payload.metadata.language : null,
|
||||
podcastFilenameFormat: typeof payload.metadata.podcastFilenameFormat === 'string' ? payload.metadata.podcastFilenameFormat : null,
|
||||
podcastType: typeof payload.metadata.type === 'string' ? payload.metadata.type : null,
|
||||
explicit: !!payload.metadata.explicit,
|
||||
autoDownloadEpisodes: !!payload.autoDownloadEpisodes,
|
||||
|
|
@ -139,6 +142,7 @@ class Podcast extends Model {
|
|||
itunesId: DataTypes.STRING,
|
||||
itunesArtistId: DataTypes.STRING,
|
||||
language: DataTypes.STRING,
|
||||
podcastFilenameFormat: DataTypes.STRING,
|
||||
podcastType: DataTypes.STRING,
|
||||
explicit: DataTypes.BOOLEAN,
|
||||
|
||||
|
|
@ -194,6 +198,7 @@ class Podcast extends Model {
|
|||
itunesId: this.itunesId,
|
||||
itunesArtistId: this.itunesArtistId,
|
||||
language: this.language,
|
||||
podcastFilenameFormat: this.podcastFilenameFormat,
|
||||
explicit: !!this.explicit,
|
||||
podcastType: this.podcastType
|
||||
}
|
||||
|
|
@ -210,7 +215,7 @@ class Podcast extends Model {
|
|||
let hasUpdates = false
|
||||
|
||||
if (payload.metadata) {
|
||||
const stringKeys = ['title', 'author', 'releaseDate', 'feedUrl', 'imageUrl', 'description', 'itunesPageUrl', 'itunesId', 'itunesArtistId', 'language', 'type']
|
||||
const stringKeys = ['title', 'author', 'releaseDate', 'feedUrl', 'imageUrl', 'description', 'itunesPageUrl', 'itunesId', 'itunesArtistId', 'language', 'type','podcastFilenameFormat']
|
||||
stringKeys.forEach((key) => {
|
||||
// Convert numbers to strings
|
||||
if (typeof payload.metadata[key] === 'number') {
|
||||
|
|
@ -408,6 +413,7 @@ class Podcast extends Model {
|
|||
itunesArtistId: this.itunesArtistId,
|
||||
explicit: this.explicit,
|
||||
language: this.language,
|
||||
podcastFilenameFormat: this.podcastFilenameFormat,
|
||||
type: this.podcastType
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue