Update:Scanned in podcast episodes remove file ext from title

This commit is contained in:
advplyr 2022-07-31 13:52:34 -05:00
parent 516c5c3308
commit 91f15d5a23

View File

@ -1,3 +1,4 @@
const Path = require('path')
const { getId } = require('../../utils/index')
const AudioFile = require('../files/AudioFile')
const AudioTrack = require('../files/AudioTrack')
@ -126,7 +127,7 @@ class PodcastEpisode {
setDataFromAudioFile(audioFile, index) {
this.id = getId('ep')
this.audioFile = audioFile
this.title = audioFile.metadata.filename
this.title = Path.basename(audioFile.metadata.filename, Path.extname(audioFile.metadata.filename))
this.index = index
this.addedAt = Date.now()
this.updatedAt = Date.now()