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 4c72d0d78..854b61b24 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/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 @@
{{ 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/collections/AddCreateModal.vue b/client/components/modals/collections/AddCreateModal.vue index f0d43c14f..24e8695d6 100644 --- a/client/components/modals/collections/AddCreateModal.vue +++ b/client/components/modals/collections/AddCreateModal.vue @@ -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 @@- {{ $strings.LabelCurrently }} {{ mediaMetadata.publishedYear }} + {{ $strings.LabelCurrently }} {{ mediaMetadata.publishedYear }}
{{ message }}
+')
- .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 @@
/metadata/cache/items.{{ getPlayMethodName(session.playMethod) }}
-
-
{{ line }}
-
-
{{ $elapsedPrettyLocalized(session.timeListening) }}
@@ -134,11 +130,7 @@{{ getPlayMethodName(session.playMethod) }}
-
-
{{ line }}
-
-
{{ $elapsedPretty(session.timeListening) }}
@@ -180,11 +172,7 @@{{ getPlayMethodName(session.playMethod) }}
-
-
{{ line }}
-
-
{{ $secondsToTimestamp(session.currentTime) }}
@@ -445,16 +433,16 @@ export default { this.selectedSession = session this.showSessionModal = true }, - getDeviceInfoLines(deviceInfo) { - if (!deviceInfo) return [] - const lines = [] + getDeviceInfoString(deviceInfo) { + if (!deviceInfo) return '' + var lines = [] if (deviceInfo.clientName) lines.push(`${deviceInfo.clientName} ${deviceInfo.clientVersion || ''}`) if (deviceInfo.osName) lines.push(`${deviceInfo.osName} ${deviceInfo.osVersion}`) if (deviceInfo.browserName) lines.push(deviceInfo.browserName) if (deviceInfo.manufacturer && deviceInfo.model) lines.push(`${deviceInfo.manufacturer} ${deviceInfo.model}`) if (deviceInfo.sdkVersion) lines.push(`SDK Version: ${deviceInfo.sdkVersion}`) - return lines + return lines.join('{{ getPlayMethodName(session.playMethod) }}
-
-
{{ line }}
-
-
{{ $elapsedPrettyLocalized(session.timeListening) }}
-See [contributing docs](https://audiobookshelf.org/docs/contributing/general/)
+### NGINX Reverse Proxy
-### Localization
+Add this to the site config file on your nginx server after you have changed the relevant parts in the <> brackets, and inserted your certificate paths.
-Thank you to [Weblate](https://hosted.weblate.org/engage/audiobookshelf/) for hosting our localization infrastructure pro-bono. If you want to see Audiobookshelf in your language, please help us localize. Additional information on helping with the translations [here](https://www.audiobookshelf.org/faq#how-do-i-help-with-translations).
-