mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-06-08 11:42:44 +02:00
Update:Media item share URL allows for sending starting time as query string #1768
This commit is contained in:
@@ -21,8 +21,12 @@ import LocalAudioPlayer from '../../players/LocalAudioPlayer'
|
||||
|
||||
export default {
|
||||
layout: 'blank',
|
||||
async asyncData({ params, error, app }) {
|
||||
const mediaItemShare = await app.$axios.$get(`/public/share/${params.slug}`).catch((error) => {
|
||||
async asyncData({ params, error, app, query }) {
|
||||
let endpoint = `/public/share/${params.slug}`
|
||||
if (query.t && !isNaN(query.t)) {
|
||||
endpoint += `?t=${query.t}`
|
||||
}
|
||||
const mediaItemShare = await app.$axios.$get(endpoint).catch((error) => {
|
||||
console.error('Failed', error)
|
||||
return null
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user