fixes
All checks were successful
repod / nextcloud (push) Successful in 1m2s
repod / nodejs (push) Successful in 1m28s

This commit is contained in:
Michel Roux 2023-08-29 11:43:17 +02:00
parent 334c3fd99f
commit 9e9e9e2bbe
3 changed files with 17 additions and 8 deletions

View File

@ -149,6 +149,8 @@ appstore:
# Start a nextcloud server on Docker to kickstart developement
.PHONY: appstore
dev: build
docker stop repod || true
docker rm repod || true
docker build -t repod .
docker run -itd -v $(CURDIR):/var/www/html/apps/repod -p 80:80 repod
docker run -itd --name repod -v $(CURDIR):/var/www/html/apps/repod -p 80:80 repod
npm run watch

View File

@ -17,12 +17,17 @@
{{ formatTimer(new Date(episode.episodeDuration*1000)) }}
</template>
<template #actions>
<NcActionButton @click="isCurrentEpisode(episode) ? load(null) : load(episode)">
<NcActionButton v-if="!isCurrentEpisode(episode)" @click="load(episode)">
<template #icon>
<PlayButton v-if="!isCurrentEpisode(episode)" :size="20" />
<StopButton v-if="isCurrentEpisode(episode)" :size="20" />
<PlayButton :size="20" />
</template>
{{ isCurrentEpisode(episode) ? t('Stop') : t('Play') }}
{{ t('Play') }}
</NcActionButton>
<NcActionButton v-if="isCurrentEpisode(episode)" @click="load(null)">
<template #icon>
<StopButton :size="20" />
</template>
{{ t('Stop') }}
</NcActionButton>
</template>
</NcListItem>

View File

@ -24,7 +24,7 @@ export const player = {
loaded: false,
paused: null,
podcastUrl: null,
volume: null,
volume: 1,
},
mutations: {
action: (state, action) => {
@ -67,8 +67,10 @@ export const player = {
actions: {
load: async (context, episode) => {
context.commit('episode', episode)
const action = await axios.get(generateUrl('/apps/repod/episodes/action?url={url}', { url: episode.episodeUrl }))
context.commit('action', action.data)
try {
const action = await axios.get(generateUrl('/apps/repod/episodes/action?url={url}', { url: episode.episodeUrl }))
context.commit('action', action.data)
} catch {}
},
pause: (context) => {
audio.pause()