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 # Start a nextcloud server on Docker to kickstart developement
.PHONY: appstore .PHONY: appstore
dev: build dev: build
docker stop repod || true
docker rm repod || true
docker build -t repod . 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 npm run watch

View File

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

View File

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