mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-02 17:24:57 +02:00
Update podcasts to new library item model
This commit is contained in:
parent
0357dc90d4
commit
69d1744496
11 changed files with 235 additions and 141 deletions
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue