mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-09 21:39:37 +00:00
Update:Media item share URL allows for sending starting time as query string #1768
This commit is contained in:
parent
c309856f74
commit
d7ace4d1dc
2 changed files with 14 additions and 3 deletions
|
|
@ -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
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue