mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-08 12:58:38 +02:00
Support servers with subdirectory
This commit is contained in:
+2
-2
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user