From 9a51c3be0f759a7dde770159a5410abe7ff17ee0 Mon Sep 17 00:00:00 2001 From: mfcar Date: Wed, 22 Feb 2023 18:48:36 +0000 Subject: [PATCH] Add dropdown to the episode type --- client/components/modals/podcast/tabs/EpisodeDetails.vue | 7 +++++-- server/objects/entities/PodcastEpisode.js | 4 ++-- server/scanner/Scanner.js | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/client/components/modals/podcast/tabs/EpisodeDetails.vue b/client/components/modals/podcast/tabs/EpisodeDetails.vue index ffa95ec0..cdc08f2f 100644 --- a/client/components/modals/podcast/tabs/EpisodeDetails.vue +++ b/client/components/modals/podcast/tabs/EpisodeDetails.vue @@ -8,7 +8,7 @@
- +
@@ -89,6 +89,9 @@ export default { }, enclosureUrl() { return this.enclosure.url + }, + episodeTypes() { + return this.$store.state.globals.episodeTypes || [] } }, methods: { @@ -146,4 +149,4 @@ export default { }, mounted() {} } - \ No newline at end of file + diff --git a/server/objects/entities/PodcastEpisode.js b/server/objects/entities/PodcastEpisode.js index 892a18e8..f1cfa77e 100644 --- a/server/objects/entities/PodcastEpisode.js +++ b/server/objects/entities/PodcastEpisode.js @@ -117,7 +117,7 @@ class PodcastEpisode { this.enclosure = data.enclosure ? { ...data.enclosure } : null this.season = data.season || '' this.episode = data.episode || '' - this.episodeType = data.episodeType || '' + this.episodeType = data.episodeType || 'full' this.publishedAt = data.publishedAt || 0 this.addedAt = Date.now() this.updatedAt = Date.now() @@ -165,4 +165,4 @@ class PodcastEpisode { return cleanStringForSearch(this.title).includes(query) } } -module.exports = PodcastEpisode \ No newline at end of file +module.exports = PodcastEpisode diff --git a/server/scanner/Scanner.js b/server/scanner/Scanner.js index 791a7140..f40f2b83 100644 --- a/server/scanner/Scanner.js +++ b/server/scanner/Scanner.js @@ -899,7 +899,7 @@ class Scanner { description: episodeToMatch.description || '', enclosure: episodeToMatch.enclosure || null, episode: episodeToMatch.episode || '', - episodeType: episodeToMatch.episodeType || '', + episodeType: episodeToMatch.episodeType || 'full', season: episodeToMatch.season || '', pubDate: episodeToMatch.pubDate || '', publishedAt: episodeToMatch.publishedAt @@ -993,4 +993,4 @@ class Scanner { return MediaFileScanner.probeAudioFileWithTone(audioFile) } } -module.exports = Scanner \ No newline at end of file +module.exports = Scanner