mirror of
https://git.crystalyx.net/Xefir/repod.git
synced 2024-12-27 09:14:56 +01:00
fix: started state and decodeUrl
This commit is contained in:
parent
9dc09c2185
commit
f4fc4b52e3
@ -1,4 +1,5 @@
|
||||
import axios from '@nextcloud/axios'
|
||||
import { decodeUrl } from '../utils/url.js'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
import moment from '@nextcloud/moment'
|
||||
import router from '../router.js'
|
||||
@ -25,8 +26,8 @@ export const player = {
|
||||
paused: null,
|
||||
podcastUrl: null,
|
||||
volume: 1,
|
||||
started: 0,
|
||||
rate: 1,
|
||||
started: 0,
|
||||
},
|
||||
mutations: {
|
||||
action: (state, action) => {
|
||||
@ -47,13 +48,14 @@ export const player = {
|
||||
state.episode = episode
|
||||
|
||||
if (episode) {
|
||||
state.podcastUrl = atob(router.currentRoute.params.url)
|
||||
state.podcastUrl = decodeUrl(router.currentRoute.params.url)
|
||||
audio.src = episode.url
|
||||
audio.load()
|
||||
audio.play()
|
||||
|
||||
if (episode.action && episode.action.position && episode.action.position < episode.action.total) {
|
||||
audio.currentTime = episode.action.position
|
||||
state.started = audio.currentTime
|
||||
}
|
||||
} else {
|
||||
state.loaded = false
|
||||
@ -73,6 +75,9 @@ export const player = {
|
||||
rate: (state, rate) => {
|
||||
state.rate = rate
|
||||
},
|
||||
started: (state, started) => {
|
||||
state.started = started
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
load: async (context, episode) => {
|
||||
|
@ -26,6 +26,7 @@ import Episodes from '../components/Feed/Episodes.vue'
|
||||
import Loading from '../components/Atoms/Loading.vue'
|
||||
import { NcEmptyContent } from '@nextcloud/vue'
|
||||
import axios from '@nextcloud/axios'
|
||||
import { decodeUrl } from '../utils/url.js'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
|
||||
export default {
|
||||
@ -47,7 +48,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
url() {
|
||||
return atob(this.$route.params.url)
|
||||
return decodeUrl(this.$route.params.url)
|
||||
},
|
||||
},
|
||||
async mounted() {
|
||||
|
Loading…
Reference in New Issue
Block a user