diff --git a/l10n/fr.js b/l10n/fr.js
index c0d3870..c612501 100644
--- a/l10n/fr.js
+++ b/l10n/fr.js
@@ -19,12 +19,17 @@ OC.L10N.register(
"Play" : "Lecture",
"Stop" : "Arrêter",
"Could not fetch episodes" : "Impossible de récuprer les épisodes",
- "Are you sure you want to delete this subscription?" : "Êtes-vous sûr de vouloir supprimer ce flux ?",
- "Error while removing the feed" : "Erreur lors de la suppression du flux",
- "Playback speed" : "Vitesse de lecture",
+ "Export subscriptions" : "Exporter les abonnements",
+ "Filtering episodes" : "Filtrage des épisodes",
+ "Show all" : "Montrer tout",
+ "Listened" : "Écoutés",
+ "Listening" : "En cours",
+ "Unlistened" : "Non lus",
"Import subscriptions" : "Importer les abonnements",
"Import OPML file" : "Importer un fichier OPML",
- "Export subscriptions" : "Exporter les abonnements",
+ "Playback speed" : "Vitesse de lecture",
+ "Are you sure you want to delete this subscription?" : "Êtes-vous sûr de vouloir supprimer ce flux ?",
+ "Error while removing the feed" : "Erreur lors de la suppression du flux",
"Add a podcast" : "Ajouter un podcast",
"Could not fetch subscriptions" : "Impossible de récupérer les flux",
"Find a podcast" : "Chercher un podcast",
diff --git a/l10n/fr.json b/l10n/fr.json
index 1e8a4e4..0894ebd 100644
--- a/l10n/fr.json
+++ b/l10n/fr.json
@@ -17,12 +17,17 @@
"Play" : "Lecture",
"Stop" : "Arrêter",
"Could not fetch episodes" : "Impossible de récuprer les épisodes",
- "Are you sure you want to delete this subscription?" : "Êtes-vous sûr de vouloir supprimer ce flux ?",
- "Error while removing the feed" : "Erreur lors de la suppression du flux",
- "Playback speed" : "Vitesse de lecture",
+ "Export subscriptions" : "Exporter les abonnements",
+ "Filtering episodes" : "Filtrage des épisodes",
+ "Show all" : "Montrer tout",
+ "Listened" : "Écoutés",
+ "Listening" : "En cours",
+ "Unlistened" : "Non lus",
"Import subscriptions" : "Importer les abonnements",
"Import OPML file" : "Importer un fichier OPML",
- "Export subscriptions" : "Exporter les abonnements",
+ "Playback speed" : "Vitesse de lecture",
+ "Are you sure you want to delete this subscription?" : "Êtes-vous sûr de vouloir supprimer ce flux ?",
+ "Error while removing the feed" : "Erreur lors de la suppression du flux",
"Add a podcast" : "Ajouter un podcast",
"Could not fetch subscriptions" : "Impossible de récupérer les flux",
"Find a podcast" : "Chercher un podcast",
diff --git a/src/components/Feed/Episodes.vue b/src/components/Feed/Episodes.vue
index a04b11c..29a1d48 100644
--- a/src/components/Feed/Episodes.vue
+++ b/src/components/Feed/Episodes.vue
@@ -2,7 +2,7 @@
-
-
@@ -88,6 +88,26 @@ export default {
currentEpisode() {
return this.$store.state.player.episode
},
+ filters() {
+ return this.$store.state.settings.filters
+ },
+ filteredEpisodes() {
+ return this.episodes.filter((episode) => {
+ if (!this.filters.listened && this.hasEnded(episode)) {
+ return false
+ }
+
+ if (!this.filters.listening && this.isListening(episode)) {
+ return false
+ }
+
+ if (!this.filters.unlistened && !this.hasEnded(episode) && !this.isListening(episode)) {
+ return false
+ }
+
+ return true
+ })
+ },
url() {
return decodeUrl(this.$route.params.url)
},
@@ -116,6 +136,9 @@ export default {
isCurrentEpisode(episode) {
return this.currentEpisode && this.currentEpisode.url === episode.url
},
+ isListening(episode) {
+ return episode.action && episode.action.action === 'PLAY' && !this.hasEnded(episode)
+ },
load(episode) {
this.$store.dispatch('player/load', episode)
},
diff --git a/src/components/Player/Volume.vue b/src/components/Player/Volume.vue
index 524ce80..3cddcea 100644
--- a/src/components/Player/Volume.vue
+++ b/src/components/Player/Volume.vue
@@ -15,7 +15,7 @@
+ @click="$store.dispatch('player/volume', volumeMuted)" />
diff --git a/src/components/Settings/Filters.vue b/src/components/Settings/Filters.vue
new file mode 100644
index 0000000..14ac319
--- /dev/null
+++ b/src/components/Settings/Filters.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+ $store.commit('settings/filters', { listened: checked, listening: checked, unlistened: checked })">
+ {{ t('repod', 'Show all') }}
+
+ $store.commit('settings/filters', { listened: checked })">
+ {{ t('repod', 'Listened') }}
+
+ $store.commit('settings/filters', { listening: checked })">
+ {{ t('repod', 'Listening') }}
+
+ $store.commit('settings/filters', { unlistened: checked })">
+ {{ t('repod', 'Unlistened') }}
+
+
+
+
+
+
diff --git a/src/components/Sidebar/Subscriptions.vue b/src/components/Sidebar/Subscriptions.vue
index 1a4919c..0d2942d 100644
--- a/src/components/Sidebar/Subscriptions.vue
+++ b/src/components/Sidebar/Subscriptions.vue
@@ -19,6 +19,7 @@
+
@@ -31,6 +32,7 @@
import { NcAppContentList, NcAppNavigationNew, NcAppNavigationSettings } from '@nextcloud/vue'
import AppNavigation from '../Atoms/AppNavigation.vue'
import Export from '../Settings/Export.vue'
+import Filters from '../Settings/Filters.vue'
import Import from '../Settings/Import.vue'
import Item from './Item.vue'
import Loading from '../Atoms/Loading.vue'
@@ -43,6 +45,7 @@ export default {
components: {
AppNavigation,
Export,
+ Filters,
Import,
Item,
Loading,
diff --git a/src/store/main.js b/src/store/main.js
index b1d36a7..b8e7f1a 100644
--- a/src/store/main.js
+++ b/src/store/main.js
@@ -1,6 +1,7 @@
import Vuex, { Store } from 'vuex'
import Vue from 'vue'
import { player } from './player.js'
+import { settings } from './settings.js'
import { subscriptions } from './subscriptions.js'
Vue.use(Vuex)
@@ -8,6 +9,7 @@ Vue.use(Vuex)
const store = new Store({
modules: {
player,
+ settings,
subscriptions,
},
})
diff --git a/src/store/settings.js b/src/store/settings.js
new file mode 100644
index 0000000..5ed4108
--- /dev/null
+++ b/src/store/settings.js
@@ -0,0 +1,15 @@
+export const settings = {
+ namespaced: true,
+ state: {
+ filters: {
+ listened: true,
+ listening: true,
+ unlistened: true,
+ },
+ },
+ mutations: {
+ filters: (state, filters) => {
+ state.filters = { ...state.filters, ...filters }
+ },
+ },
+}
diff --git a/translationfiles/fr/repod.po b/translationfiles/fr/repod.po
index ee4250a..54c137f 100644
--- a/translationfiles/fr/repod.po
+++ b/translationfiles/fr/repod.po
@@ -86,14 +86,23 @@ msgstr "Arrêter"
msgid "Could not fetch episodes"
msgstr "Impossible de récuprer les épisodes"
-msgid "Are you sure you want to delete this subscription?"
-msgstr "Êtes-vous sûr de vouloir supprimer ce flux ?"
+msgid "Export subscriptions"
+msgstr "Exporter les abonnements"
-msgid "Error while removing the feed"
-msgstr "Erreur lors de la suppression du flux"
+msgid "Filtering episodes"
+msgstr "Filtrage des épisodes"
-msgid "Playback speed"
-msgstr "Vitesse de lecture"
+msgid "Show all"
+msgstr "Montrer tout"
+
+msgid "Listened"
+msgstr "Écoutés"
+
+msgid "Listening"
+msgstr "En cours"
+
+msgid "Unlistened"
+msgstr "Non lus"
msgid "Import subscriptions"
msgstr "Importer les abonnements"
@@ -101,8 +110,14 @@ msgstr "Importer les abonnements"
msgid "Import OPML file"
msgstr "Importer un fichier OPML"
-msgid "Export subscriptions"
-msgstr "Exporter les abonnements"
+msgid "Playback speed"
+msgstr "Vitesse de lecture"
+
+msgid "Are you sure you want to delete this subscription?"
+msgstr "Êtes-vous sûr de vouloir supprimer ce flux ?"
+
+msgid "Error while removing the feed"
+msgstr "Erreur lors de la suppression du flux"
msgid "Add a podcast"
msgstr "Ajouter un podcast"
diff --git a/translationfiles/templates/repod.pot b/translationfiles/templates/repod.pot
index 96fefde..b2784d0 100644
--- a/translationfiles/templates/repod.pot
+++ b/translationfiles/templates/repod.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Nextcloud 3.14159\n"
"Report-Msgid-Bugs-To: translations\\@example.com\n"
-"POT-Creation-Date: 2024-01-21 11:14+0000\n"
+"POT-Creation-Date: 2024-01-29 22:30+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -100,49 +100,69 @@ msgid "Could not fetch episodes"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:14
-msgid "Are you sure you want to delete this subscription?"
-msgstr ""
-
-#: /app/specialVueFakeDummyForL10nScript.js:15
-msgid "Error while removing the feed"
-msgstr ""
-
-#: /app/specialVueFakeDummyForL10nScript.js:16
-msgid "Playback speed"
-msgstr ""
-
-#: /app/specialVueFakeDummyForL10nScript.js:17
-msgid "Import subscriptions"
-msgstr ""
-
-#: /app/specialVueFakeDummyForL10nScript.js:18
-msgid "Import OPML file"
-msgstr ""
-
-#: /app/specialVueFakeDummyForL10nScript.js:19
msgid "Export subscriptions"
msgstr ""
+#: /app/specialVueFakeDummyForL10nScript.js:15
+msgid "Filtering episodes"
+msgstr ""
+
+#: /app/specialVueFakeDummyForL10nScript.js:16
+msgid "Show all"
+msgstr ""
+
+#: /app/specialVueFakeDummyForL10nScript.js:17
+msgid "Listened"
+msgstr ""
+
+#: /app/specialVueFakeDummyForL10nScript.js:18
+msgid "Listening"
+msgstr ""
+
+#: /app/specialVueFakeDummyForL10nScript.js:19
+msgid "Unlistened"
+msgstr ""
+
#: /app/specialVueFakeDummyForL10nScript.js:20
-msgid "Add a podcast"
+msgid "Import subscriptions"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:21
-msgid "Could not fetch subscriptions"
+msgid "Import OPML file"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:22
-msgid "Find a podcast"
+msgid "Playback speed"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:23
-msgid "Error loading feed"
+msgid "Are you sure you want to delete this subscription?"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:24
-msgid "Missing required app"
+msgid "Error while removing the feed"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:25
+msgid "Add a podcast"
+msgstr ""
+
+#: /app/specialVueFakeDummyForL10nScript.js:26
+msgid "Could not fetch subscriptions"
+msgstr ""
+
+#: /app/specialVueFakeDummyForL10nScript.js:27
+msgid "Find a podcast"
+msgstr ""
+
+#: /app/specialVueFakeDummyForL10nScript.js:28
+msgid "Error loading feed"
+msgstr ""
+
+#: /app/specialVueFakeDummyForL10nScript.js:29
+msgid "Missing required app"
+msgstr ""
+
+#: /app/specialVueFakeDummyForL10nScript.js:30
msgid "Install GPodder Sync"
msgstr ""