Update podcasts to new library item model

This commit is contained in:
advplyr 2025-01-03 16:48:24 -06:00
parent 0357dc90d4
commit 69d1744496
11 changed files with 235 additions and 141 deletions

View file

@ -143,6 +143,23 @@ class PodcastEpisode extends Model {
return this.audioFile?.duration || 0
}
/**
* Used for matching the episode with an episode in the RSS feed
*
* @param {string} guid
* @param {string} enclosureURL
* @returns {boolean}
*/
checkMatchesGuidOrEnclosureUrl(guid, enclosureURL) {
if (this.extraData?.guid && this.extraData.guid === guid) {
return true
}
if (this.enclosureURL && this.enclosureURL === enclosureURL) {
return true
}
return false
}
/**
* Used in client players
*