Add dropdown to the episode type

This commit is contained in:
mfcar 2023-02-22 18:48:36 +00:00
parent b1ee54522a
commit 9a51c3be0f
No known key found for this signature in database
3 changed files with 9 additions and 6 deletions

View File

@ -8,7 +8,7 @@
<ui-text-input-with-label v-model="newEpisode.episode" :label="$strings.LabelEpisode" />
</div>
<div class="w-1/5 p-1">
<ui-text-input-with-label v-model="newEpisode.episodeType" :label="$strings.LabelEpisodeType" />
<ui-dropdown v-model="newEpisode.episodeType" :label="$strings.LabelEpisodeType" :items="episodeTypes" small />
</div>
<div class="w-2/5 p-1">
<ui-text-input-with-label v-model="pubDateInput" @input="updatePubDate" type="datetime-local" :label="$strings.LabelPubDate" />
@ -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() {}
}
</script>
</script>

View File

@ -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
module.exports = PodcastEpisode

View File

@ -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
module.exports = Scanner