diff --git a/client/components/app/BookShelfRow.vue b/client/components/app/BookShelfRow.vue index fac89a70..082f9fe3 100644 --- a/client/components/app/BookShelfRow.vue +++ b/client/components/app/BookShelfRow.vue @@ -93,10 +93,10 @@ export default { editAuthor(author) { this.$store.commit('globals/showEditAuthorModal', author) }, - editItem(libraryItem, tab = 'details') { + editItem(libraryItem) { var itemIds = this.shelf.entities.map((e) => e.id) this.$store.commit('setBookshelfBookIds', itemIds) - this.$store.commit('showEditModalOnTab', { libraryItem, tab: tab || 'details' }) + this.$store.commit('showEditModal', libraryItem) }, editEpisode({ libraryItem, episode }) { this.$store.commit('setEpisodeTableEpisodeIds', [episode.id]) diff --git a/client/components/app/LazyBookshelf.vue b/client/components/app/LazyBookshelf.vue index 4c72d0d7..854b61b2 100644 --- a/client/components/app/LazyBookshelf.vue +++ b/client/components/app/LazyBookshelf.vue @@ -232,11 +232,11 @@ export default { clearFilter() { this.$store.dispatch('user/updateUserSettings', { filterBy: 'all' }) }, - editEntity(entity, tab = 'details') { + editEntity(entity) { if (this.entityName === 'items' || this.entityName === 'series-books') { const bookIds = this.entities.map((e) => e.id) this.$store.commit('setBookshelfBookIds', bookIds) - this.$store.commit('showEditModalOnTab', { libraryItem: entity, tab: tab || 'details' }) + this.$store.commit('showEditModal', entity) } else if (this.entityName === 'collections') { this.$store.commit('globals/setEditCollection', entity) } else if (this.entityName === 'playlists') { diff --git a/client/components/cards/LazyBookCard.vue b/client/components/cards/LazyBookCard.vue index d06f083b..fbb50bb1 100644 --- a/client/components/cards/LazyBookCard.vue +++ b/client/components/cards/LazyBookCard.vue @@ -788,11 +788,11 @@ export default { }, showEditModalFiles() { // More menu func - this.$emit('edit', this.libraryItem, 'files') + this.store.commit('showEditModalOnTab', { libraryItem: this.libraryItem, tab: 'files' }) }, showEditModalMatch() { // More menu func - this.$emit('edit', this.libraryItem, 'match') + this.store.commit('showEditModalOnTab', { libraryItem: this.libraryItem, tab: 'match' }) }, sendToDevice(deviceName) { // More menu func diff --git a/client/components/widgets/ItemSlider.vue b/client/components/widgets/ItemSlider.vue index 5b96e51b..880654a4 100644 --- a/client/components/widgets/ItemSlider.vue +++ b/client/components/widgets/ItemSlider.vue @@ -132,10 +132,10 @@ export default { editAuthor(author) { this.$store.commit('globals/showEditAuthorModal', author) }, - editItem(libraryItem, tab = 'details') { + editItem(libraryItem) { var itemIds = this.items.map((e) => e.id) this.$store.commit('setBookshelfBookIds', itemIds) - this.$store.commit('showEditModalOnTab', { libraryItem, tab: tab || 'details' }) + this.$store.commit('showEditModal', libraryItem) }, selectItem(payload) { this.$emit('selectEntity', payload) diff --git a/client/mixins/bookshelfCardsHelpers.js b/client/mixins/bookshelfCardsHelpers.js index f1571f70..fc8a4125 100644 --- a/client/mixins/bookshelfCardsHelpers.js +++ b/client/mixins/bookshelfCardsHelpers.js @@ -118,8 +118,8 @@ export default { propsData: props, parent: this, created() { - this.$on('edit', (entity, tab) => { - if (_this.editEntity) _this.editEntity(entity, tab) + this.$on('edit', (entity) => { + if (_this.editEntity) _this.editEntity(entity) }) this.$on('select', ({ entity, shiftKey }) => { if (_this.selectEntity) _this.selectEntity(entity, shiftKey) diff --git a/client/package-lock.json b/client/package-lock.json index 0d2699ed..efc8e443 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1,12 +1,12 @@ { "name": "audiobookshelf-client", - "version": "2.30.0", + "version": "2.29.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "audiobookshelf-client", - "version": "2.30.0", + "version": "2.29.0", "license": "ISC", "dependencies": { "@nuxtjs/axios": "^5.13.6", diff --git a/client/package.json b/client/package.json index 50fd0b71..da046a67 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "audiobookshelf-client", - "version": "2.30.0", + "version": "2.29.0", "buildNumber": 1, "description": "Self-hosted audiobook and podcast client", "main": "index.js", diff --git a/client/pages/audiobook/_id/chapters.vue b/client/pages/audiobook/_id/chapters.vue index 4d6c0e41..cf254165 100644 --- a/client/pages/audiobook/_id/chapters.vue +++ b/client/pages/audiobook/_id/chapters.vue @@ -117,10 +117,10 @@ - @@ -594,14 +594,6 @@ export default { this.hasChanges = hasChanges }, - getAudioTrackForTime(time) { - if (typeof time !== 'number') { - return null - } - return this.tracks.find((at) => { - return time >= at.startOffset && time < at.startOffset + at.duration - }) - }, playChapter(chapter) { console.log('Play Chapter', chapter.id) if (this.selectedChapterId === chapter.id) { @@ -616,12 +608,9 @@ export default { this.destroyAudioEl() } - const audioTrack = this.getAudioTrackForTime(chapter.start) - if (!audioTrack) { - console.error('No audio track found for chapter', chapter) - return - } - + const audioTrack = this.tracks.find((at) => { + return chapter.start >= at.startOffset && chapter.start < at.startOffset + at.duration + }) this.selectedChapter = chapter this.isLoadingChapter = true diff --git a/client/pages/login.vue b/client/pages/login.vue index 60f31eca..ef3827af 100644 --- a/client/pages/login.vue +++ b/client/pages/login.vue @@ -189,7 +189,6 @@ export default { require('@/plugins/chromecast.js').default(this) } - this.$store.commit('libraries/setLastLoad', 0) // Ensure libraries get loaded again when switching users this.$store.commit('libraries/setCurrentLibrary', { id: userDefaultLibraryId }) this.$store.commit('user/setUser', user) // Access token only returned from login, not authorize diff --git a/client/plugins/i18n.js b/client/plugins/i18n.js index e4c17901..86109175 100644 --- a/client/plugins/i18n.js +++ b/client/plugins/i18n.js @@ -29,7 +29,6 @@ const languageCodeMap = { ru: { label: 'Русский', dateFnsLocale: 'ru' }, sl: { label: 'Slovenščina', dateFnsLocale: 'sl' }, sv: { label: 'Svenska', dateFnsLocale: 'sv' }, - tr: { label: 'Türkçe', dateFnsLocale: 'tr' }, uk: { label: 'Українська', dateFnsLocale: 'uk' }, 'vi-vn': { label: 'Tiếng Việt', dateFnsLocale: 'vi' }, 'zh-cn': { label: '简体中文 (Simplified Chinese)', dateFnsLocale: 'zhCN' }, diff --git a/client/store/libraries.js b/client/store/libraries.js index 115fb53b..62c515eb 100644 --- a/client/store/libraries.js +++ b/client/store/libraries.js @@ -159,7 +159,7 @@ export const actions = { .$get(`/api/libraries`) .then((data) => { commit('set', data.libraries) - commit('setLastLoad', new Date()) + commit('setLastLoad') }) .catch((error) => { console.error('Failed', error) @@ -176,8 +176,8 @@ export const mutations = { setFoldersLastUpdate(state) { state.folderLastUpdate = Date.now() }, - setLastLoad(state, date) { - state.lastLoad = date + setLastLoad(state) { + state.lastLoad = Date.now() }, setLibraryIssues(state, val) { state.issues = val diff --git a/package-lock.json b/package-lock.json index 8eea3abb..99415bd9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "audiobookshelf", - "version": "2.30.0", + "version": "2.29.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "audiobookshelf", - "version": "2.30.0", + "version": "2.29.0", "license": "GPL-3.0", "dependencies": { "axios": "^0.27.2", diff --git a/package.json b/package.json index 0b4ee413..00168f25 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "audiobookshelf", - "version": "2.30.0", + "version": "2.29.0", "buildNumber": 1, "description": "Self-hosted audiobook and podcast server", "main": "index.js",