diff --git a/src/components/Atoms/Modal.vue b/src/components/Atoms/Modal.vue
index 56d33d0..500c844 100644
--- a/src/components/Atoms/Modal.vue
+++ b/src/components/Atoms/Modal.vue
@@ -6,7 +6,7 @@
:size="256"
:url="episode.image" />
{{ episode.name }}
-
+
@@ -32,6 +32,7 @@
diff --git a/src/components/Feed/Episode.vue b/src/components/Feed/Episode.vue
index 5ea59a9..c107684 100644
--- a/src/components/Feed/Episode.vue
+++ b/src/components/Feed/Episode.vue
@@ -165,10 +165,10 @@ export default {
},
methods: {
...mapActions(usePlayer, ['load']),
+ filenameFromUrl,
formatLocaleDate,
hasEnded,
isListening,
- filenameFromUrl,
t,
isCurrentEpisode(episode: EpisodeInterface) {
return this.playerEpisode?.url === episode.url
diff --git a/src/components/Feed/Episodes.vue b/src/components/Feed/Episodes.vue
index 58c7e60..ed089f0 100644
--- a/src/components/Feed/Episodes.vue
+++ b/src/components/Feed/Episodes.vue
@@ -43,15 +43,12 @@ export default {
if (!this.filters.listened && this.hasEnded(episode)) {
return false
}
-
if (!this.filters.listening && this.isListening(episode)) {
return false
}
-
if (!this.filters.unlistened && !this.isListening(episode)) {
return false
}
-
return true
})
},
diff --git a/src/main.ts b/src/main.ts
index 5772082..fa3b35a 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,7 +1,7 @@
import App from './App.vue'
import { createApp } from 'vue'
import { createPinia } from 'pinia'
-import router from './router'
+import router from './router.ts'
const Vue = createApp(App)
const pinia = createPinia()
diff --git a/src/store/player.ts b/src/store/player.ts
index 2076e74..ade7c45 100644
--- a/src/store/player.ts
+++ b/src/store/player.ts
@@ -1,7 +1,7 @@
-import type { EpisodeActionInterface, EpisodeInterface } from '../utils/types'
+import type { EpisodeActionInterface, EpisodeInterface } from '../utils/types.ts'
import axios from '@nextcloud/axios'
import { defineStore } from 'pinia'
-import { formatEpisodeTimestamp } from '../utils/time'
+import { formatEpisodeTimestamp } from '../utils/time.ts'
import { generateUrl } from '@nextcloud/router'
const audio = new Audio()
@@ -86,18 +86,15 @@ export const usePlayer = defineStore('player', {
return
}
- this.episode = {
- ...this.episode,
- action: {
- podcast: this.podcastUrl,
- episode: this.episode.url,
- guid: this.episode.guid,
- action: 'play',
- timestamp: formatEpisodeTimestamp(new Date()),
- started: Math.round(this.started),
- position: Math.round(audio.currentTime),
- total: Math.round(audio.duration),
- },
+ this.episode.action = {
+ podcast: this.podcastUrl,
+ episode: this.episode.url,
+ guid: this.episode.guid,
+ action: 'play',
+ timestamp: formatEpisodeTimestamp(new Date()),
+ started: Math.round(this.started),
+ position: Math.round(audio.currentTime),
+ total: Math.round(audio.duration),
}
axios.post(generateUrl('/apps/gpoddersync/episode_action/create'), [
diff --git a/src/store/settings.ts b/src/store/settings.ts
index 2fa94b8..61defb3 100644
--- a/src/store/settings.ts
+++ b/src/store/settings.ts
@@ -1,5 +1,5 @@
-import { getCookie, setCookie } from '../utils/cookies'
-import type { FiltersInterface } from '../utils/types'
+import { getCookie, setCookie } from '../utils/cookies.ts'
+import type { FiltersInterface } from '../utils/types.ts'
import { defineStore } from 'pinia'
export const useSettings = defineStore('settings', {
diff --git a/src/store/subscriptions.ts b/src/store/subscriptions.ts
index 73e6a6e..37163d4 100644
--- a/src/store/subscriptions.ts
+++ b/src/store/subscriptions.ts
@@ -2,8 +2,8 @@ import type {
PersonalSettingsMetricsInterface,
PodcastDataInterface,
SubscriptionInterface,
-} from '../utils/types'
-import { getCookie, setCookie } from '../utils/cookies'
+} from '../utils/types.ts'
+import { getCookie, setCookie } from '../utils/cookies.ts'
import axios from '@nextcloud/axios'
import { defineStore } from 'pinia'
import { generateUrl } from '@nextcloud/router'
@@ -26,6 +26,7 @@ export const useSubscriptions = defineStore('subscriptions', {
const metrics = await axios.get(
generateUrl('/apps/gpoddersync/personal_settings/metrics'),
)
+
this.subs = [...metrics.data.subscriptions]
.sort((a, b) => b.listenedSeconds - a.listenedSeconds)
.map((sub) => ({