From 91f15d5a23cfde424f978b3b7527ffcffe2cbfa9 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sun, 31 Jul 2022 13:52:34 -0500 Subject: [PATCH] Update:Scanned in podcast episodes remove file ext from title --- server/objects/entities/PodcastEpisode.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/objects/entities/PodcastEpisode.js b/server/objects/entities/PodcastEpisode.js index 988421db..e9717e2f 100644 --- a/server/objects/entities/PodcastEpisode.js +++ b/server/objects/entities/PodcastEpisode.js @@ -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()