This commit is contained in:
MagiX13 2026-05-07 00:00:51 -07:00 committed by GitHub
commit a1e8c5fdf9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 126 additions and 7 deletions

View file

@ -40,6 +40,8 @@ class Podcast extends Model {
/** @type {string} */
this.language
/** @type {string} */
this.podcastFilenameFormat
/** @type {string} */
this.podcastType
/** @type {boolean} */
this.explicit
@ -106,6 +108,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,
@ -143,6 +146,7 @@ class Podcast extends Model {
itunesId: DataTypes.STRING,
itunesArtistId: DataTypes.STRING,
language: DataTypes.STRING,
podcastFilenameFormat: DataTypes.STRING,
podcastType: DataTypes.STRING,
explicit: DataTypes.BOOLEAN,
@ -198,6 +202,7 @@ class Podcast extends Model {
itunesId: this.itunesId,
itunesArtistId: this.itunesArtistId,
language: this.language,
podcastFilenameFormat: this.podcastFilenameFormat,
explicit: !!this.explicit,
podcastType: this.podcastType
}
@ -214,7 +219,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') {
@ -413,6 +418,7 @@ class Podcast extends Model {
itunesArtistId: this.itunesArtistId,
explicit: this.explicit,
language: this.language,
podcastFilenameFormat: this.podcastFilenameFormat,
type: this.podcastType
}
}