mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-04 10:04:39 +02:00
Support servers with subdirectory
This commit is contained in:
parent
2452f09714
commit
16de3fdb97
4 changed files with 22 additions and 12 deletions
|
@ -69,7 +69,7 @@ export const getters = {
|
|||
// return `http://localhost:3333/api/items/${libraryItem.id}/cover?token=${userToken}&ts=${lastUpdate}`
|
||||
}
|
||||
|
||||
const url = new URL(`/api/items/${libraryItem.id}/cover`, serverAddress)
|
||||
const url = new URL(`${serverAddress}/api/items/${libraryItem.id}/cover`)
|
||||
return `${url}?token=${userToken}&ts=${lastUpdate}${raw ? '&raw=1' : ''}`
|
||||
},
|
||||
getLibraryItemCoverSrcById: (state, getters, rootState, rootGetters) => (libraryItemId, placeholder = null) => {
|
||||
|
@ -79,7 +79,7 @@ export const getters = {
|
|||
const serverAddress = rootGetters['user/getServerAddress']
|
||||
if (!userToken || !serverAddress) return placeholder
|
||||
|
||||
const url = new URL(`/api/items/${libraryItemId}/cover`, serverAddress)
|
||||
const url = new URL(`${serverAddress}/api/items/${libraryItemId}/cover`)
|
||||
return `${url}?token=${userToken}`
|
||||
},
|
||||
getLocalMediaProgressById: (state) => (localLibraryItemId, episodeId = null) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue