fix comic reader, undo epub 'fix'

This commit is contained in:
Kareem Ahmad 2026-06-03 11:38:19 -04:00
parent 7fd1140d38
commit d9fa4d709c
4 changed files with 10 additions and 10 deletions

View file

@ -65,7 +65,7 @@ const MAX_SCALE = 400
const MIN_SCALE = 10 const MIN_SCALE = 10
Archive.init({ Archive.init({
workerUrl: '/libarchive/worker-bundle.js' workerUrl: '/audiobookshelf/libarchive/worker-bundle.js'
}) })
export default { export default {
@ -109,9 +109,9 @@ export default {
}, },
ebookUrl() { ebookUrl() {
if (this.fileId) { if (this.fileId) {
return `/audiobookshelf/api/items/${this.libraryItemId}/ebook/${this.fileId}` return `/api/items/${this.libraryItemId}/ebook/${this.fileId}`
} }
return `/audiobookshelf/api/items/${this.libraryItemId}/ebook` return `/api/items/${this.libraryItemId}/ebook`
}, },
comicMetadataKeys() { comicMetadataKeys() {
return this.comicMetadata ? Object.keys(this.comicMetadata) : [] return this.comicMetadata ? Object.keys(this.comicMetadata) : []
@ -176,7 +176,7 @@ export default {
ebookLocation: this.page, ebookLocation: this.page,
ebookProgress: Math.max(0, Math.min(1, (Number(this.page) - 1) / Number(this.numPages))) ebookProgress: Math.max(0, Math.min(1, (Number(this.page) - 1) / Number(this.numPages)))
} }
this.$axios.$patch(`/audiobookshelf/api/me/progress/${this.libraryItemId}`, payload, { progress: false }).catch((error) => { this.$axios.$patch(`/api/me/progress/${this.libraryItemId}`, payload, { progress: false }).catch((error) => {
console.error('ComicReader.updateProgress failed:', error) console.error('ComicReader.updateProgress failed:', error)
}) })
}, },

View file

@ -94,9 +94,9 @@ export default {
}, },
ebookUrl() { ebookUrl() {
if (this.fileId) { if (this.fileId) {
return `/audiobookshelf/api/items/${this.libraryItemId}/ebook/${this.fileId}` return `/api/items/${this.libraryItemId}/ebook/${this.fileId}`
} }
return `/audiobookshelf/api/items/${this.libraryItemId}/ebook` return `/api/items/${this.libraryItemId}/ebook`
}, },
themeRules() { themeRules() {
const theme = this.ereaderSettings.theme const theme = this.ereaderSettings.theme
@ -206,7 +206,7 @@ export default {
*/ */
updateProgress(payload) { updateProgress(payload) {
if (!this.keepProgress) return if (!this.keepProgress) return
this.$axios.$patch(`/audiobookshelf/api/me/progress/${this.libraryItemId}`, payload, { progress: false }).catch((error) => { this.$axios.$patch(`/api/me/progress/${this.libraryItemId}`, payload, { progress: false }).catch((error) => {
console.error('EpubReader.updateProgress failed:', error) console.error('EpubReader.updateProgress failed:', error)
}) })
}, },

View file

@ -31,9 +31,9 @@ export default {
}, },
ebookUrl() { ebookUrl() {
if (this.fileId) { if (this.fileId) {
return `/audiobookshelf/api/items/${this.libraryItemId}/ebook/${this.fileId}` return `/api/items/${this.libraryItemId}/ebook/${this.fileId}`
} }
return `/audiobookshelf/api/items/${this.libraryItemId}/ebook` return `/api/items/${this.libraryItemId}/ebook`
} }
}, },
methods: { methods: {

View file

@ -127,7 +127,7 @@ export default {
ebookLocation: this.page, ebookLocation: this.page,
ebookProgress: Math.max(0, Math.min(1, (Number(this.page) - 1) / Number(this.numPages))) ebookProgress: Math.max(0, Math.min(1, (Number(this.page) - 1) / Number(this.numPages)))
} }
this.$axios.$patch(`/audiobookshelf/api/me/progress/${this.libraryItemId}`, payload, { progress: false }).catch((error) => { this.$axios.$patch(`/api/me/progress/${this.libraryItemId}`, payload, { progress: false }).catch((error) => {
console.error('EpubReader.updateProgress failed:', error) console.error('EpubReader.updateProgress failed:', error)
}) })
}, },