RSS Manager code

This commit is contained in:
mfcar 2023-10-03 12:32:39 +01:00
parent 2ada293e8a
commit aefcc4490f
No known key found for this signature in database
7 changed files with 508 additions and 233 deletions

View file

@ -16,6 +16,8 @@ class PodcastMetadata {
this.explicit = false
this.language = null
this.type = null
this.lastSuccessfulFetchAt = null
this.feedHealthy = null
if (metadata) {
this.construct(metadata)
@ -36,6 +38,8 @@ class PodcastMetadata {
this.explicit = metadata.explicit
this.language = metadata.language || null
this.type = metadata.type || 'episodic'
this.lastSuccessfulFetchAt = metadata.lastSuccessfulFetchAt || null
this.feedHealthy = metadata.feedHealthy || null
}
toJSON() {
@ -52,7 +56,9 @@ class PodcastMetadata {
itunesArtistId: this.itunesArtistId,
explicit: this.explicit,
language: this.language,
type: this.type
type: this.type,
lastSuccessfulFetchAt: this.lastSuccessfulFetchAt,
feedHealthy: this.feedHealthy
}
}
@ -71,7 +77,9 @@ class PodcastMetadata {
itunesArtistId: this.itunesArtistId,
explicit: this.explicit,
language: this.language,
type: this.type
type: this.type,
lastSuccessfulFetchAt: this.lastSuccessfulFetchAt,
feedHealthy: this.feedHealthy
}
}
@ -120,6 +128,8 @@ class PodcastMetadata {
if (mediaMetadata.genres && mediaMetadata.genres.length) {
this.genres = [...mediaMetadata.genres]
}
this.lastSuccessfulFetchAt = mediaMetadata.lastSuccessfulFetchAt || null
this.feedHealthy = mediaMetadata.feedHealthy || null
}
update(payload) {