mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-15 16:29:37 +00:00
Add:Parsing meta tags from podcast episode audio file #1488
This commit is contained in:
parent
704fbaced8
commit
212b97fa20
7 changed files with 197 additions and 5 deletions
|
|
@ -175,6 +175,10 @@ class Podcast {
|
|||
return null
|
||||
}
|
||||
|
||||
findEpisodeWithInode(inode) {
|
||||
return this.episodes.find(ep => ep.audioFile.ino === inode)
|
||||
}
|
||||
|
||||
setData(mediaData) {
|
||||
this.metadata = new PodcastMetadata()
|
||||
if (mediaData.metadata) {
|
||||
|
|
@ -315,5 +319,13 @@ class Podcast {
|
|||
getEpisode(episodeId) {
|
||||
return this.episodes.find(ep => ep.id == episodeId)
|
||||
}
|
||||
|
||||
// Audio file metadata tags map to podcast details
|
||||
setMetadataFromAudioFile(overrideExistingDetails = false) {
|
||||
if (!this.episodes.length) return false
|
||||
const audioFile = this.episodes[0].audioFile
|
||||
if (!audioFile?.metaTags) return false
|
||||
return this.metadata.setDataFromAudioMetaTags(audioFile.metaTags, overrideExistingDetails)
|
||||
}
|
||||
}
|
||||
module.exports = Podcast
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue