mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-12-03 13:44:09 +01:00
Add:Parsing meta tags from podcast episode audio file #1488
This commit is contained in:
1 parent
704fbaced8
commit
212b97fa20
7 files changed
+197
-5
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user