diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 809563018..2e5f4bced 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -47,7 +47,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -60,7 +60,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v3 + uses: github/codeql-action/autobuild@v2 # â„šī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun @@ -73,6 +73,6 @@ jobs: # ./location_of_script_within_repo/buildscript.sh - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@v2 with: category: '/language:${{matrix.language}}' diff --git a/build/debian/DEBIAN/preinst b/build/debian/DEBIAN/preinst index 241a47010..e30bc490c 100644 --- a/build/debian/DEBIAN/preinst +++ b/build/debian/DEBIAN/preinst @@ -22,7 +22,7 @@ add_user() { declare -r descr="${4:-No description}" declare -r shell="${5:-/bin/false}" - if ! getent passwd "$user" 2>&1 >/dev/null; then + if ! getent passwd | grep -q "^$user:"; then echo "Creating system user: $user in $group with $descr and shell $shell" useradd $uid_flags --gid $group --no-create-home --system --shell $shell -c "$descr" $user fi @@ -39,7 +39,7 @@ add_group() { declare -r gid_flags="--gid $gid" fi - if ! getent group "$group" 2>&1 >/dev/null; then + if ! getent group | grep -q "^$group:" ; then echo "Creating system group: $group" groupadd $gid_flags --system $group fi diff --git a/client/components/app/Appbar.vue b/client/components/app/Appbar.vue index 428ae6ebf..f74134041 100644 --- a/client/components/app/Appbar.vue +++ b/client/components/app/Appbar.vue @@ -196,7 +196,6 @@ export default { requestBatchQuickEmbed() { const payload = { message: this.$strings.MessageConfirmQuickEmbed, - allowHtml: true, callback: (confirmed) => { if (confirmed) { this.$axios diff --git a/client/components/app/BookShelfCategorized.vue b/client/components/app/BookShelfCategorized.vue index a8e8ae469..4bf8cfbbf 100644 --- a/client/components/app/BookShelfCategorized.vue +++ b/client/components/app/BookShelfCategorized.vue @@ -300,8 +300,6 @@ export default { }) }, userUpdated(user) { - if (user.id !== this.$store.state.user.user.id) return - if (user.seriesHideFromContinueListening && user.seriesHideFromContinueListening.length) { this.removeAllSeriesFromContinueSeries(user.seriesHideFromContinueListening) } diff --git a/client/components/app/BookShelfRow.vue b/client/components/app/BookShelfRow.vue index fac89a70b..082f9fe37 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 9ec492a8f..854b61b24 100644 --- a/client/components/app/LazyBookshelf.vue +++ b/client/components/app/LazyBookshelf.vue @@ -22,7 +22,7 @@
{{ emptyMessageHelp }} - + help_outline @@ -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/ItemUploadCard.vue b/client/components/cards/ItemUploadCard.vue index adbf3adbe..40836b8e4 100644 --- a/client/components/cards/ItemUploadCard.vue +++ b/client/components/cards/ItemUploadCard.vue @@ -62,24 +62,7 @@
- -
- - {{ nonInteractionLabel }} - -
- -
-
- - {{ uploadProgressText }} - -
-
-
-
-
-
+
@@ -108,11 +91,7 @@ export default { isUploading: false, uploadFailed: false, uploadSuccess: false, - isFetchingMetadata: false, - uploadProgress: { - loaded: 0, - total: 0 - } + isFetchingMetadata: false } }, computed: { @@ -137,15 +116,6 @@ export default { } else if (this.isFetchingMetadata) { return this.$strings.LabelFetchingMetadata } - }, - uploadProgressPercent() { - if (this.uploadProgress.total === 0) return 0 - return Math.min(100, Math.round((this.uploadProgress.loaded / this.uploadProgress.total) * 100)) - }, - uploadProgressText() { - const loaded = this.$bytesPretty(this.uploadProgress.loaded) - const total = this.$bytesPretty(this.uploadProgress.total) - return `${this.uploadProgressPercent}% (${loaded} / ${total})` } }, methods: { @@ -153,21 +123,6 @@ export default { this.isUploading = status === 'uploading' this.uploadFailed = status === 'failed' this.uploadSuccess = status === 'success' - - if (status !== 'uploading') { - this.uploadProgress = { - loaded: 0, - total: 0 - } - } - }, - setUploadProgress(progress) { - if (this.isUploading && progress) { - this.uploadProgress = { - loaded: progress.loaded || 0, - total: progress.total || 0 - } - } }, titleUpdated() { this.error = '' diff --git a/client/components/cards/LazyBookCard.vue b/client/components/cards/LazyBookCard.vue index 51f657dbc..fbb50bb14 100644 --- a/client/components/cards/LazyBookCard.vue +++ b/client/components/cards/LazyBookCard.vue @@ -78,7 +78,7 @@ - +
priority_high
@@ -121,12 +121,12 @@
- +

{{ displayTitle }}

- +

{{ displaySubtitle }}

{{ displayLineTwo || ' ' }}

@@ -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/controls/LibraryFilterSelect.vue b/client/components/controls/LibraryFilterSelect.vue index 4834a1a25..62a9b8037 100644 --- a/client/components/controls/LibraryFilterSelect.vue +++ b/client/components/controls/LibraryFilterSelect.vue @@ -338,18 +338,6 @@ export default { const series = this.series.find((se) => se.id == decoded) if (series) filterValue = series.name } - } else if (parts[0] === 'progress') { - const item = this.progress.find((p) => p.id == decoded) - if (item) filterValue = item.name - } else if (parts[0] === 'tracks') { - const item = this.tracks.find((t) => t.id == decoded) - if (item) filterValue = item.name - } else if (parts[0] === 'ebooks') { - const item = this.ebooks.find((e) => e.id == decoded) - if (item) filterValue = item.name - } else if (parts[0] === 'missing') { - const item = this.missing.find((m) => m.id == decoded) - if (item) filterValue = item.name } else { filterValue = decoded } diff --git a/client/components/modals/BatchQuickMatchModel.vue b/client/components/modals/BatchQuickMatchModel.vue index f6bcd9728..8bea68faf 100644 --- a/client/components/modals/BatchQuickMatchModel.vue +++ b/client/components/modals/BatchQuickMatchModel.vue @@ -88,7 +88,7 @@ export default { }, providers() { if (this.isPodcast) return this.$store.state.scanners.podcastProviders - return this.$store.state.scanners.bookProviders + return this.$store.state.scanners.providers }, libraryProvider() { return this.$store.getters['libraries/getLibraryProvider'](this.currentLibraryId) || 'google' @@ -96,9 +96,6 @@ export default { }, methods: { init() { - // Fetch providers when modal is shown - this.$store.dispatch('scanners/fetchProviders') - // If we don't have a set provider (first open of dialog) or we've switched library, set // the selected provider to the current library default provider if (!this.options.provider || this.lastUsedLibrary != this.currentLibraryId) { @@ -130,7 +127,8 @@ export default { this.show = false }) } - } + }, + mounted() {} } diff --git a/client/components/modals/ShareModal.vue b/client/components/modals/ShareModal.vue index 3dc1d8057..bd0c9acfb 100644 --- a/client/components/modals/ShareModal.vue +++ b/client/components/modals/ShareModal.vue @@ -8,7 +8,7 @@
- + help_outline diff --git a/client/components/modals/collections/AddCreateModal.vue b/client/components/modals/collections/AddCreateModal.vue index 5cec2255a..24e8695d6 100644 --- a/client/components/modals/collections/AddCreateModal.vue +++ b/client/components/modals/collections/AddCreateModal.vue @@ -25,7 +25,7 @@

{{ $strings.MessageBookshelfNoCollectionsHelp }}

- + help_outline @@ -227,7 +227,7 @@ export default { .catch((error) => { console.error('Failed to create collection', error) var errMsg = error.response ? error.response.data || '' : '' - this.$toast.error(errMsg) + this.$toast.error(this.$strings.ToastCollectionCreateFailed + ': ' + errMsg) this.processing = false }) } diff --git a/client/components/modals/item/tabs/Cover.vue b/client/components/modals/item/tabs/Cover.vue index be17f9636..b404a9abb 100644 --- a/client/components/modals/item/tabs/Cover.vue +++ b/client/components/modals/item/tabs/Cover.vue @@ -133,8 +133,8 @@ export default { } }, providers() { - if (this.isPodcast) return this.$store.state.scanners.podcastCoverProviders - return this.$store.state.scanners.bookCoverProviders + if (this.isPodcast) return this.$store.state.scanners.podcastProviders + return [{ text: 'Best', value: 'best' }, ...this.$store.state.scanners.providers, ...this.$store.state.scanners.coverOnlyProviders, { text: 'All', value: 'all' }] }, searchTitleLabel() { if (this.provider.startsWith('audible')) return this.$strings.LabelSearchTitleOrASIN @@ -438,8 +438,6 @@ export default { mounted() { // Setup socket listeners when component is mounted this.addSocketListeners() - // Fetch providers if not already loaded - this.$store.dispatch('scanners/fetchProviders') }, beforeDestroy() { // Cancel any ongoing search when component is destroyed diff --git a/client/components/modals/item/tabs/Match.vue b/client/components/modals/item/tabs/Match.vue index a1fc41091..3faa26b27 100644 --- a/client/components/modals/item/tabs/Match.vue +++ b/client/components/modals/item/tabs/Match.vue @@ -2,7 +2,7 @@
@@ -105,7 +105,7 @@

- {{ $strings.LabelCurrently }} {{ mediaMetadata.publisher }} + {{ $strings.LabelCurrently }} {{ mediaMetadata.publisher }}

@@ -114,7 +114,7 @@

- {{ $strings.LabelCurrently }} {{ mediaMetadata.publishedYear }} + {{ $strings.LabelCurrently }} {{ mediaMetadata.publishedYear }}

@@ -253,7 +253,6 @@ export default { hasSearched: false, selectedMatch: null, selectedMatchOrig: null, - waitingForProviders: false, selectedMatchUsage: { title: true, subtitle: true, @@ -286,19 +285,9 @@ export default { handler(newVal) { if (newVal) this.init() } - }, - providersLoaded(isLoaded) { - // Complete initialization once providers are loaded - if (isLoaded && this.waitingForProviders) { - this.waitingForProviders = false - this.initProviderAndSearch() - } } }, computed: { - providersLoaded() { - return this.$store.getters['scanners/areProvidersLoaded'] - }, isProcessing: { get() { return this.processing @@ -330,7 +319,7 @@ export default { }, providers() { if (this.isPodcast) return this.$store.state.scanners.podcastProviders - return this.$store.state.scanners.bookProviders + return this.$store.state.scanners.providers }, searchTitleLabel() { if (this.provider.startsWith('audible')) return this.$strings.LabelSearchTitleOrASIN @@ -489,24 +478,6 @@ export default { this.checkboxToggled() }, - initProviderAndSearch() { - // Set provider based on media type - if (this.isPodcast) { - this.provider = 'itunes' - } else { - this.provider = this.getDefaultBookProvider() - } - - // Prefer using ASIN if set and using audible provider - if (this.provider.startsWith('audible') && this.libraryItem.media.metadata.asin) { - this.searchTitle = this.libraryItem.media.metadata.asin - this.searchAuthor = '' - } - - if (this.searchTitle) { - this.submitSearch() - } - }, init() { this.clearSelectedMatch() this.initSelectedMatchUsage() @@ -524,13 +495,19 @@ export default { } this.searchTitle = this.libraryItem.media.metadata.title this.searchAuthor = this.libraryItem.media.metadata.authorName || '' + if (this.isPodcast) this.provider = 'itunes' + else { + this.provider = this.getDefaultBookProvider() + } - // Wait for providers to be loaded before setting provider and searching - if (this.providersLoaded || this.isPodcast) { - this.waitingForProviders = false - this.initProviderAndSearch() - } else { - this.waitingForProviders = true + // Prefer using ASIN if set and using audible provider + if (this.provider.startsWith('audible') && this.libraryItem.media.metadata.asin) { + this.searchTitle = this.libraryItem.media.metadata.asin + this.searchAuthor = '' + } + + if (this.searchTitle) { + this.submitSearch() } }, selectMatch(match) { @@ -660,10 +637,6 @@ export default { this.selectedMatch = null this.selectedMatchOrig = null } - }, - mounted() { - // Fetch providers if not already loaded - this.$store.dispatch('scanners/fetchProviders') } } diff --git a/client/components/modals/item/tabs/Schedule.vue b/client/components/modals/item/tabs/Schedule.vue index 0faa29630..2cd3af514 100644 --- a/client/components/modals/item/tabs/Schedule.vue +++ b/client/components/modals/item/tabs/Schedule.vue @@ -158,8 +158,6 @@ export default { this.isProcessing = true var updateResult = await this.$axios.$patch(`/api/items/${this.libraryItemId}/media`, updatePayload).catch((error) => { console.error('Failed to update', error) - const errorMessage = typeof error?.response?.data === 'string' ? error?.response?.data : null - this.$toast.error(errorMessage || this.$strings.ToastFailedToUpdate) return false }) this.isProcessing = false diff --git a/client/components/modals/item/tabs/Tools.vue b/client/components/modals/item/tabs/Tools.vue index 8e40ca3c0..d96550887 100644 --- a/client/components/modals/item/tabs/Tools.vue +++ b/client/components/modals/item/tabs/Tools.vue @@ -107,7 +107,6 @@ export default { quickEmbed() { const payload = { message: this.$strings.MessageConfirmQuickEmbed, - allowHtml: true, callback: (confirmed) => { if (confirmed) { this.$axios diff --git a/client/components/modals/libraries/EditLibrary.vue b/client/components/modals/libraries/EditLibrary.vue index c805f79b0..083fc5766 100644 --- a/client/components/modals/libraries/EditLibrary.vue +++ b/client/components/modals/libraries/EditLibrary.vue @@ -74,7 +74,7 @@ export default { }, providers() { if (this.mediaType === 'podcast') return this.$store.state.scanners.podcastProviders - return this.$store.state.scanners.bookProviders + return this.$store.state.scanners.providers } }, methods: { @@ -156,8 +156,6 @@ export default { }, mounted() { this.init() - // Fetch providers if not already loaded - this.$store.dispatch('scanners/fetchProviders') } } diff --git a/client/components/modals/libraries/LibraryScannerSettings.vue b/client/components/modals/libraries/LibraryScannerSettings.vue index 6a8856a0e..b27925ce4 100644 --- a/client/components/modals/libraries/LibraryScannerSettings.vue +++ b/client/components/modals/libraries/LibraryScannerSettings.vue @@ -8,7 +8,7 @@

{{ $strings.LabelMetadataOrderOfPrecedenceDescription }}

- + help_outline diff --git a/client/components/modals/libraries/LibrarySettings.vue b/client/components/modals/libraries/LibrarySettings.vue index 7cfc22017..d3b40de95 100644 --- a/client/components/modals/libraries/LibrarySettings.vue +++ b/client/components/modals/libraries/LibrarySettings.vue @@ -104,6 +104,7 @@ export default { }, data() { return { + provider: null, useSquareBookCovers: false, enableWatcher: false, skipMatchingMediaWithAsin: false, @@ -133,6 +134,10 @@ export default { isPodcastLibrary() { return this.mediaType === 'podcast' }, + providers() { + if (this.mediaType === 'podcast') return this.$store.state.scanners.podcastProviders + return this.$store.state.scanners.providers + }, maskAsFinishedWhenItems() { return [ { diff --git a/client/components/modals/playlists/AddCreateModal.vue b/client/components/modals/playlists/AddCreateModal.vue index 9aa68bd80..e695ccb0c 100644 --- a/client/components/modals/playlists/AddCreateModal.vue +++ b/client/components/modals/playlists/AddCreateModal.vue @@ -25,7 +25,7 @@

{{ $strings.MessageNoUserPlaylistsHelp }}

- + help_outline @@ -97,10 +97,7 @@ export default { ...playlist } }) - .sort((a, b) => { - if (a.isItemIncluded !== b.isItemIncluded) return a.isItemIncluded ? -1 : 1 - return a.name.localeCompare(b.name) - }) + .sort((a, b) => (a.isItemIncluded ? -1 : 1)) }, isBatch() { return this.selectedPlaylistItems.length > 1 diff --git a/client/components/player/PlayerPlaybackControls.vue b/client/components/player/PlayerPlaybackControls.vue index c7cbba63c..368e3f35b 100644 --- a/client/components/player/PlayerPlaybackControls.vue +++ b/client/components/player/PlayerPlaybackControls.vue @@ -8,7 +8,7 @@ - diff --git a/client/components/prompt/Confirm.vue b/client/components/prompt/Confirm.vue index d0828c7d1..361765e2d 100644 --- a/client/components/prompt/Confirm.vue +++ b/client/components/prompt/Confirm.vue @@ -3,8 +3,7 @@
-

-

{{ message }}

+

@@ -53,17 +52,6 @@ export default { message() { return this.confirmPromptOptions.message || '' }, - allowHtmlMessage() { - return !!this.confirmPromptOptions.allowHtml - }, - sanitizedMessage() { - if (!this.allowHtmlMessage) return this.message - - return this.escapeHtml(this.message) - .replace(/<br\s*\/?>/gi, '
') - .replace(/<code>/gi, '') - .replace(/<\/code>/gi, '') - }, callback() { return this.confirmPromptOptions.callback }, @@ -115,14 +103,6 @@ export default { if (this.callback) this.callback(true, this.checkboxValue) this.show = false }, - escapeHtml(value) { - return String(value) - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"') - .replace(/'/g, ''') - }, setShow() { this.checkboxValue = this.checkboxDefaultValue this.$eventBus.$emit('showing-prompt', true) diff --git a/client/components/stats/DailyListeningChart.vue b/client/components/stats/DailyListeningChart.vue index 55752fc5d..c0f3acb32 100644 --- a/client/components/stats/DailyListeningChart.vue +++ b/client/components/stats/DailyListeningChart.vue @@ -14,7 +14,7 @@

- +
@@ -186,16 +186,10 @@ export default { daysInARow() { var count = 0 while (true) { - const _date = this.$addDaysToToday(count * -1 - 1) - const datestr = this.$formatJsDate(_date, 'yyyy-MM-dd') + var _date = this.$addDaysToToday(count * -1) + var datestr = this.$formatJsDate(_date, 'yyyy-MM-dd') if (!this.listeningStatsDays[datestr] || this.listeningStatsDays[datestr] === 0) { - // don't require listening today to count towards days in a row, but do count it if already listened today - const today = this.$formatJsDate(new Date(), 'yyyy-MM-dd') - if (this.listeningStatsDays[today]) { - count++ - } - return count } count++ diff --git a/client/components/ui/LoadingIndicator.vue b/client/components/ui/LoadingIndicator.vue index 3b4b6e049..d984bf35e 100644 --- a/client/components/ui/LoadingIndicator.vue +++ b/client/components/ui/LoadingIndicator.vue @@ -1,5 +1,5 @@ @@ -25,9 +23,6 @@ export default { computed: { message() { return this.text || this.$strings.MessagePleaseWait - }, - hasSlotContent() { - return this.$slots.default && this.$slots.default.length > 0 } } } diff --git a/client/components/ui/MultiSelect.vue b/client/components/ui/MultiSelect.vue index 3dcfb0495..c7572ba50 100644 --- a/client/components/ui/MultiSelect.vue +++ b/client/components/ui/MultiSelect.vue @@ -278,7 +278,7 @@ export default { }) }, insertNewItem(item) { - if (!this.selected.includes(item)) this.selected.push(item) + this.selected.push(item) this.$emit('input', this.selected) this.$emit('newItem', item) this.textInput = null diff --git a/client/components/ui/MultiSelectQueryInput.vue b/client/components/ui/MultiSelectQueryInput.vue index 4bc434cbd..18abc66e7 100644 --- a/client/components/ui/MultiSelectQueryInput.vue +++ b/client/components/ui/MultiSelectQueryInput.vue @@ -287,7 +287,7 @@ export default { }) }, insertNewItem(item) { - if (!this.selected.find((i) => i.name === item.name)) this.selected.push(item) + this.selected.push(item) this.$emit('input', this.selected) this.$emit('newItem', item) this.textInput = null diff --git a/client/components/ui/TextInput.vue b/client/components/ui/TextInput.vue index cd3bc6d2d..dd0eaa738 100644 --- a/client/components/ui/TextInput.vue +++ b/client/components/ui/TextInput.vue @@ -1,6 +1,6 @@ @@ -26,8 +26,7 @@ export default { disabled: Boolean, inputClass: String, showCopy: Boolean, - trimWhitespace: Boolean, - autocomplete: String + trimWhitespace: Boolean }, data() { return {} diff --git a/client/components/ui/Tooltip.vue b/client/components/ui/Tooltip.vue index c858cbfec..e6ab0117b 100644 --- a/client/components/ui/Tooltip.vue +++ b/client/components/ui/Tooltip.vue @@ -22,8 +22,7 @@ export default { type: Number, default: 0 }, - disabled: Boolean, - plaintext: Boolean + disabled: Boolean }, data() { return { @@ -47,11 +46,7 @@ export default { methods: { updateText() { if (this.tooltip) { - if (this.plaintext) { - this.tooltip.textContent = this.text - } else { - this.tooltip.innerHTML = this.text - } + this.tooltip.innerHTML = this.text this.setTooltipPosition(this.tooltip) } }, @@ -63,11 +58,7 @@ export default { tooltip.className = 'tooltip-wrapper absolute px-2 py-1 text-white text-xs rounded-sm shadow-lg max-w-xs text-center hidden sm:block' tooltip.style.zIndex = 100 tooltip.style.backgroundColor = 'rgba(0,0,0,0.85)' - if (this.plaintext) { - tooltip.textContent = this.text - } else { - tooltip.innerHTML = this.text - } + tooltip.innerHTML = this.text tooltip.addEventListener('mouseover', this.cancelHide) tooltip.addEventListener('mouseleave', this.hideTooltip) diff --git a/client/components/widgets/ItemSlider.vue b/client/components/widgets/ItemSlider.vue index 5b96e51b4..880654a44 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/layouts/default.vue b/client/layouts/default.vue index 75753b214..4b9729248 100644 --- a/client/layouts/default.vue +++ b/client/layouts/default.vue @@ -371,13 +371,11 @@ export default { }, customMetadataProviderAdded(provider) { if (!provider?.id) return - // Refresh providers cache - this.$store.dispatch('scanners/refreshProviders') + this.$store.commit('scanners/addCustomMetadataProvider', provider) }, customMetadataProviderRemoved(provider) { if (!provider?.id) return - // Refresh providers cache - this.$store.dispatch('scanners/refreshProviders') + this.$store.commit('scanners/removeCustomMetadataProvider', provider) }, initializeSocket() { if (this.$root.socket) { diff --git a/client/mixins/bookshelfCardsHelpers.js b/client/mixins/bookshelfCardsHelpers.js index f1571f70e..fc8a41256 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 502ba4b03..0d2699ed1 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1,12 +1,12 @@ { "name": "audiobookshelf-client", - "version": "2.35.1", + "version": "2.30.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "audiobookshelf-client", - "version": "2.35.1", + "version": "2.30.0", "license": "ISC", "dependencies": { "@nuxtjs/axios": "^5.13.6", diff --git a/client/package.json b/client/package.json index 0ec070b32..50fd0b713 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "audiobookshelf-client", - "version": "2.35.1", + "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 e91a8846d..cf254165b 100644 --- a/client/pages/audiobook/_id/chapters.vue +++ b/client/pages/audiobook/_id/chapters.vue @@ -117,16 +117,16 @@
-
{{ elapsedTime }}s
- + @@ -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/config/api-keys/index.vue b/client/pages/config/api-keys/index.vue index 88208a9b1..2523feed8 100644 --- a/client/pages/config/api-keys/index.vue +++ b/client/pages/config/api-keys/index.vue @@ -7,7 +7,7 @@
- + help_outline diff --git a/client/pages/config/authentication.vue b/client/pages/config/authentication.vue index 4f47ce3c0..f31f9ea22 100644 --- a/client/pages/config/authentication.vue +++ b/client/pages/config/authentication.vue @@ -24,7 +24,7 @@

{{ $strings.HeaderOpenIDConnectAuthentication }}

- + help_outline diff --git a/client/pages/config/email.vue b/client/pages/config/email.vue index 075593ac5..33fbdd32f 100644 --- a/client/pages/config/email.vue +++ b/client/pages/config/email.vue @@ -3,7 +3,7 @@