diff --git a/client/components/tables/podcast/EpisodesTable.vue b/client/components/tables/podcast/EpisodesTable.vue
index 39228a39..929ceced 100644
--- a/client/components/tables/podcast/EpisodesTable.vue
+++ b/client/components/tables/podcast/EpisodesTable.vue
@@ -19,7 +19,12 @@
{{ $strings.MessageNoEpisodes }}
-
+
+
+
+
@@ -46,7 +51,10 @@ export default {
selectedEpisodes: [],
episodesToRemove: [],
processing: false,
- quickMatchingEpisodes: false
+ quickMatchingEpisodes: false,
+ search: null,
+ searchTimeout: null,
+ searchText: null,
}
},
watch: {
@@ -137,6 +145,15 @@ export default {
return String(a[this.sortKey]).localeCompare(String(b[this.sortKey]), undefined, { numeric: true, sensitivity: 'base' })
})
},
+ episodesList() {
+ return this.episodesSorted.filter((episode) => {
+ if (!this.searchText) return true
+ return (
+ (episode.title && episode.title.toLowerCase().includes(this.searchText)) ||
+ (episode.subtitle && episode.subtitle.toLowerCase().includes(this.searchText))
+ )
+ })
+ },
selectedIsFinished() {
// Find an item that is not finished, if none then all items finished
return !this.selectedEpisodes.find((episode) => {
@@ -146,6 +163,16 @@ export default {
}
},
methods: {
+ inputUpdate() {
+ clearTimeout(this.searchTimeout)
+ this.searchTimeout = setTimeout(() => {
+ if (!this.search || !this.search.trim()) {
+ this.searchText = ''
+ return
+ }
+ this.searchText = this.search.toLowerCase().trim()
+ }, 500)
+ },
contextMenuAction(action) {
if (action === 'quick-match-episodes') {
if (this.quickMatchingEpisodes) return
@@ -314,4 +341,4 @@ export default {
.episode-leave-active {
position: absolute;
}
-
\ No newline at end of file
+