diff --git a/client/components/app/BookShelfRow.vue b/client/components/app/BookShelfRow.vue
index 082f9fe37..fac89a70b 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) {
+ editItem(libraryItem, tab = 'details') {
var itemIds = this.shelf.entities.map((e) => e.id)
this.$store.commit('setBookshelfBookIds', itemIds)
- this.$store.commit('showEditModal', libraryItem)
+ this.$store.commit('showEditModalOnTab', { libraryItem, tab: tab || 'details' })
},
editEpisode({ libraryItem, episode }) {
this.$store.commit('setEpisodeTableEpisodeIds', [episode.id])
diff --git a/client/components/app/LazyBookshelf.vue b/client/components/app/LazyBookshelf.vue
index 854b61b24..4c72d0d78 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) {
+ editEntity(entity, tab = 'details') {
if (this.entityName === 'items' || this.entityName === 'series-books') {
const bookIds = this.entities.map((e) => e.id)
this.$store.commit('setBookshelfBookIds', bookIds)
- this.$store.commit('showEditModal', entity)
+ this.$store.commit('showEditModalOnTab', { libraryItem: entity, tab: tab || 'details' })
} 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 fbb50bb14..d06f083ba 100644
--- a/client/components/cards/LazyBookCard.vue
+++ b/client/components/cards/LazyBookCard.vue
@@ -788,11 +788,11 @@ export default {
},
showEditModalFiles() {
// More menu func
- this.store.commit('showEditModalOnTab', { libraryItem: this.libraryItem, tab: 'files' })
+ this.$emit('edit', this.libraryItem, 'files')
},
showEditModalMatch() {
// More menu func
- this.store.commit('showEditModalOnTab', { libraryItem: this.libraryItem, tab: 'match' })
+ this.$emit('edit', this.libraryItem, 'match')
},
sendToDevice(deviceName) {
// More menu func
diff --git a/client/components/widgets/ItemSlider.vue b/client/components/widgets/ItemSlider.vue
index 880654a44..5b96e51b4 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) {
+ editItem(libraryItem, tab = 'details') {
var itemIds = this.items.map((e) => e.id)
this.$store.commit('setBookshelfBookIds', itemIds)
- this.$store.commit('showEditModal', libraryItem)
+ this.$store.commit('showEditModalOnTab', { libraryItem, tab: tab || 'details' })
},
selectItem(payload) {
this.$emit('selectEntity', payload)
diff --git a/client/mixins/bookshelfCardsHelpers.js b/client/mixins/bookshelfCardsHelpers.js
index fc8a41256..f1571f70e 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) => {
- if (_this.editEntity) _this.editEntity(entity)
+ this.$on('edit', (entity, tab) => {
+ if (_this.editEntity) _this.editEntity(entity, tab)
})
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 efc8e4436..0d2699ed1 100644
--- a/client/package-lock.json
+++ b/client/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "audiobookshelf-client",
- "version": "2.29.0",
+ "version": "2.30.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "audiobookshelf-client",
- "version": "2.29.0",
+ "version": "2.30.0",
"license": "ISC",
"dependencies": {
"@nuxtjs/axios": "^5.13.6",
diff --git a/client/package.json b/client/package.json
index da046a67f..50fd0b713 100644
--- a/client/package.json
+++ b/client/package.json
@@ -1,6 +1,6 @@
{
"name": "audiobookshelf-client",
- "version": "2.29.0",
+ "version": "2.30.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 cf254165b..4d6c0e41d 100644
--- a/client/pages/audiobook/_id/chapters.vue
+++ b/client/pages/audiobook/_id/chapters.vue
@@ -117,10 +117,10 @@
-
@@ -594,6 +594,14 @@ 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) {
@@ -608,9 +616,12 @@ export default {
this.destroyAudioEl()
}
- const audioTrack = this.tracks.find((at) => {
- return chapter.start >= at.startOffset && chapter.start < at.startOffset + at.duration
- })
+ const audioTrack = this.getAudioTrackForTime(chapter.start)
+ if (!audioTrack) {
+ console.error('No audio track found for chapter', chapter)
+ return
+ }
+
this.selectedChapter = chapter
this.isLoadingChapter = true
diff --git a/client/pages/login.vue b/client/pages/login.vue
index ef3827afe..60f31eca5 100644
--- a/client/pages/login.vue
+++ b/client/pages/login.vue
@@ -189,6 +189,7 @@ 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 861091757..e4c179016 100644
--- a/client/plugins/i18n.js
+++ b/client/plugins/i18n.js
@@ -29,6 +29,7 @@ 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 62c515ebf..115fb53bf 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')
+ commit('setLastLoad', new Date())
})
.catch((error) => {
console.error('Failed', error)
@@ -176,8 +176,8 @@ export const mutations = {
setFoldersLastUpdate(state) {
state.folderLastUpdate = Date.now()
},
- setLastLoad(state) {
- state.lastLoad = Date.now()
+ setLastLoad(state, date) {
+ state.lastLoad = date
},
setLibraryIssues(state, val) {
state.issues = val
diff --git a/package-lock.json b/package-lock.json
index 99415bd9c..8eea3abbd 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "audiobookshelf",
- "version": "2.29.0",
+ "version": "2.30.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "audiobookshelf",
- "version": "2.29.0",
+ "version": "2.30.0",
"license": "GPL-3.0",
"dependencies": {
"axios": "^0.27.2",
diff --git a/package.json b/package.json
index 00168f25c..0b4ee4137 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "audiobookshelf",
- "version": "2.29.0",
+ "version": "2.30.0",
"buildNumber": 1,
"description": "Self-hosted audiobook and podcast server",
"main": "index.js",