diff --git a/Dockerfile b/Dockerfile index 816bdd3c..f9c46117 100644 --- a/Dockerfile +++ b/Dockerfile @@ -57,7 +57,7 @@ WORKDIR /app # Copy compiled frontend and server from build stages COPY --from=build-client /client/dist /app/client/dist COPY --from=build-server /server /app -COPY --from=build-server ${NUSQLITE3_PATH} ${NUSQLITE3_PATH} +COPY --from=build-server /usr/local/lib/nusqlite3 /usr/local/lib/nusqlite3 EXPOSE 80 diff --git a/client/components/cards/LazyBookCard.vue b/client/components/cards/LazyBookCard.vue index 41b73310..35c959fa 100644 --- a/client/components/cards/LazyBookCard.vue +++ b/client/components/cards/LazyBookCard.vue @@ -198,7 +198,7 @@ export default { return this.store.getters['user/getSizeMultiplier'] }, dateFormat() { - return this.store.getters['getServerSetting']('dateFormat') + return this.store.state.serverSettings.dateFormat }, _libraryItem() { return this.libraryItem || {} diff --git a/client/components/cards/LazySeriesCard.vue b/client/components/cards/LazySeriesCard.vue index 34cea7e2..3532095b 100644 --- a/client/components/cards/LazySeriesCard.vue +++ b/client/components/cards/LazySeriesCard.vue @@ -71,7 +71,7 @@ export default { return this.height * this.sizeMultiplier }, dateFormat() { - return this.store.getters['getServerSetting']('dateFormat') + return this.store.state.serverSettings.dateFormat }, labelFontSize() { if (this.width < 160) return 0.75 diff --git a/client/components/controls/LibraryFilterSelect.vue b/client/components/controls/LibraryFilterSelect.vue index 62a9b803..4fd72827 100644 --- a/client/components/controls/LibraryFilterSelect.vue +++ b/client/components/controls/LibraryFilterSelect.vue @@ -94,9 +94,6 @@ export default { userIsAdminOrUp() { return this.$store.getters['user/getIsAdminOrUp'] }, - userCanAccessExplicitContent() { - return this.$store.getters['user/getUserCanAccessExplicitContent'] - }, libraryMediaType() { return this.$store.getters['libraries/getCurrentLibraryMediaType'] }, @@ -242,15 +239,6 @@ export default { sublist: false } ] - - if (this.userCanAccessExplicitContent) { - items.push({ - text: this.$strings.LabelExplicit, - value: 'explicit', - sublist: false - }) - } - if (this.userIsAdminOrUp) { items.push({ text: this.$strings.LabelShareOpen, @@ -261,7 +249,7 @@ export default { return items }, podcastItems() { - const items = [ + return [ { text: this.$strings.LabelAll, value: 'all' @@ -288,23 +276,8 @@ export default { text: this.$strings.ButtonIssues, value: 'issues', sublist: false - }, - { - text: this.$strings.LabelRSSFeedOpen, - value: 'feed-open', - sublist: false } ] - - if (this.userCanAccessExplicitContent) { - items.push({ - text: this.$strings.LabelExplicit, - value: 'explicit', - sublist: false - }) - } - - return items }, selectItems() { if (this.isSeries) return this.seriesItems diff --git a/client/components/modals/BookmarksModal.vue b/client/components/modals/BookmarksModal.vue index d84a8ed8..de8c72b7 100644 --- a/client/components/modals/BookmarksModal.vue +++ b/client/components/modals/BookmarksModal.vue @@ -79,10 +79,10 @@ export default { return !this.bookmarks.find((bm) => Math.abs(this.currentTime - bm.time) < 1) }, dateFormat() { - return this.$store.getters['getServerSetting']('dateFormat') + return this.$store.state.serverSettings.dateFormat }, timeFormat() { - return this.$store.getters['getServerSetting']('timeFormat') + return this.$store.state.serverSettings.timeFormat } }, methods: { diff --git a/client/components/modals/EditSeriesInputInnerModal.vue b/client/components/modals/EditSeriesInputInnerModal.vue index bd568321..6190551e 100644 --- a/client/components/modals/EditSeriesInputInnerModal.vue +++ b/client/components/modals/EditSeriesInputInnerModal.vue @@ -14,7 +14,6 @@ -
{{ error }}
{{ $strings.ButtonSubmit }}
@@ -35,17 +34,12 @@ export default { existingSeriesNames: { type: Array, default: () => [] - }, - originalSeriesSequence: { - type: String, - default: null } }, data() { return { el: null, - content: null, - error: null + content: null } }, watch: { @@ -91,17 +85,10 @@ export default { } }, submitSeriesForm() { - this.error = null - if (this.$refs.newSeriesSelect) { this.$refs.newSeriesSelect.blur() } - if (this.selectedSeries.sequence !== this.originalSeriesSequence && this.selectedSeries.sequence.includes(' ')) { - this.error = this.$strings.MessageSeriesSequenceCannotContainSpaces - return - } - this.$emit('submit') }, clickClose() { @@ -113,7 +100,6 @@ export default { } }, setShow() { - this.error = null if (!this.el || !this.content) { this.init() } diff --git a/client/components/modals/ListeningSessionModal.vue b/client/components/modals/ListeningSessionModal.vue index ecf00f78..a2469836 100644 --- a/client/components/modals/ListeningSessionModal.vue +++ b/client/components/modals/ListeningSessionModal.vue @@ -159,10 +159,10 @@ export default { return 'Unknown' }, dateFormat() { - return this.$store.getters['getServerSetting']('dateFormat') + return this.$store.state.serverSettings.dateFormat }, timeFormat() { - return this.$store.getters['getServerSetting']('timeFormat') + return this.$store.state.serverSettings.timeFormat }, isOpenSession() { return !!this._session.open diff --git a/client/components/modals/ShareModal.vue b/client/components/modals/ShareModal.vue index bd0c9acf..24994b22 100644 --- a/client/components/modals/ShareModal.vue +++ b/client/components/modals/ShareModal.vue @@ -144,7 +144,7 @@ export default { expirationDateString() { if (!this.expireDurationSeconds) return this.$strings.LabelPermanent const dateMs = Date.now() + this.expireDurationSeconds * 1000 - return this.$formatDatetime(dateMs, this.$store.getters['getServerSetting']('dateFormat'), this.$store.getters['getServerSetting']('timeFormat')) + return this.$formatDatetime(dateMs, this.$store.state.serverSettings.dateFormat, this.$store.state.serverSettings.timeFormat) } }, methods: { diff --git a/client/components/modals/changelog/ViewModal.vue b/client/components/modals/changelog/ViewModal.vue index 939ee71d..1b332a1d 100644 --- a/client/components/modals/changelog/ViewModal.vue +++ b/client/components/modals/changelog/ViewModal.vue @@ -40,7 +40,7 @@ export default { } }, dateFormat() { - return this.$store.getters['getServerSetting']('dateFormat') + return this.$store.state.serverSettings.dateFormat }, releasesToShow() { return this.versionData?.releasesToShow || [] diff --git a/client/components/modals/podcast/EpisodeFeed.vue b/client/components/modals/podcast/EpisodeFeed.vue index 6b99cee7..08f2f38c 100644 --- a/client/components/modals/podcast/EpisodeFeed.vue +++ b/client/components/modals/podcast/EpisodeFeed.vue @@ -35,14 +35,7 @@

{{ episode.subtitle }}

-
- -

Published {{ episode.publishedAt ? $dateDistanceFromNow(episode.publishedAt) : 'Unknown' }}

- -

{{ $strings.LabelDuration }}: {{ $elapsedPretty(episode.durationSeconds) }}

- -

{{ $strings.LabelSize }}: {{ $bytesPretty(Number(episode.enclosure.length)) }}

-
+

Published {{ episode.publishedAt ? $dateDistanceFromNow(episode.publishedAt) : 'Unknown' }}

@@ -251,8 +244,8 @@ export default { const sizeInMb = payloadSize / 1024 / 1024 const sizeInMbPretty = sizeInMb.toFixed(2) + 'MB' console.log('Request size', sizeInMb) - if (sizeInMb > 9.99) { - return this.$toast.error(`Request is too large (${sizeInMbPretty}) should be < 10Mb`) + if (sizeInMb > 4.99) { + return this.$toast.error(`Request is too large (${sizeInMbPretty}) should be < 5Mb`) } this.processing = true diff --git a/client/components/modals/podcast/RemoveEpisode.vue b/client/components/modals/podcast/RemoveEpisode.vue index b2cebe84..38dd71cf 100644 --- a/client/components/modals/podcast/RemoveEpisode.vue +++ b/client/components/modals/podcast/RemoveEpisode.vue @@ -11,7 +11,7 @@ {{ $getString('MessageConfirmRemoveEpisode', [episodeTitle]) }}

{{ $getString('MessageConfirmRemoveEpisodes', [episodes.length]) }}

-

{{ $strings.MessageConfirmRemoveEpisodeNote }}

+

Note: This does not delete the audio file unless toggling "Hard delete file"

diff --git a/client/components/modals/podcast/ViewEpisode.vue b/client/components/modals/podcast/ViewEpisode.vue index 2502a5ea..5a520ef4 100644 --- a/client/components/modals/podcast/ViewEpisode.vue +++ b/client/components/modals/podcast/ViewEpisode.vue @@ -16,7 +16,7 @@

{{ title }}

-
+

{{ $strings.MessageNoDescription }}

@@ -34,12 +34,6 @@ {{ audioFileSize }}

-
-

{{ $strings.LabelDuration }}

-

- {{ audioFileDuration }} -

-
@@ -74,7 +68,7 @@ export default { return this.episode.title || 'No Episode Title' }, description() { - return this.parseDescription(this.episode.description || '') + return this.episode.description || '' }, media() { return this.libraryItem?.media || {} @@ -96,49 +90,11 @@ export default { return this.$bytesPretty(size) }, - audioFileDuration() { - const duration = this.episode.duration || 0 - return this.$elapsedPretty(duration) - }, bookCoverAspectRatio() { return this.$store.getters['libraries/getBookCoverAspectRatio'] } }, - methods: { - handleDescriptionClick(e) { - if (e.target.matches('span.time-marker')) { - const time = parseInt(e.target.dataset.time) - if (!isNaN(time)) { - this.$eventBus.$emit('play-item', { - episodeId: this.episodeId, - libraryItemId: this.libraryItem.id, - startTime: time - }) - } - e.preventDefault() - } - }, - parseDescription(description) { - const timeMarkerLinkRegex = /(.*?)<\/a>/g - const timeMarkerRegex = /\b\d{1,2}:\d{1,2}(?::\d{1,2})?\b/g - - function convertToSeconds(time) { - const timeParts = time.split(':').map(Number) - return timeParts.reduce((acc, part, index) => acc * 60 + part, 0) - } - - return description - .replace(timeMarkerLinkRegex, (match, href, displayTime) => { - const time = displayTime.match(timeMarkerRegex)[0] - const seekTimeInSeconds = convertToSeconds(time) - return `${displayTime}` - }) - .replace(timeMarkerRegex, (match) => { - const seekTimeInSeconds = convertToSeconds(match) - return `${match}` - }) - } - }, + methods: {}, mounted() {} } diff --git a/client/components/tables/BackupsTable.vue b/client/components/tables/BackupsTable.vue index f769abdb..769c8d25 100644 --- a/client/components/tables/BackupsTable.vue +++ b/client/components/tables/BackupsTable.vue @@ -78,10 +78,10 @@ export default { return this.$store.getters['user/getToken'] }, dateFormat() { - return this.$store.getters['getServerSetting']('dateFormat') + return this.$store.state.serverSettings.dateFormat }, timeFormat() { - return this.$store.getters['getServerSetting']('timeFormat') + return this.$store.state.serverSettings.timeFormat } }, methods: { diff --git a/client/components/tables/UsersTable.vue b/client/components/tables/UsersTable.vue index c7171018..20f41228 100644 --- a/client/components/tables/UsersTable.vue +++ b/client/components/tables/UsersTable.vue @@ -76,10 +76,10 @@ export default { return usermap }, dateFormat() { - return this.$store.getters['getServerSetting']('dateFormat') + return this.$store.state.serverSettings.dateFormat }, timeFormat() { - return this.$store.getters['getServerSetting']('timeFormat') + return this.$store.state.serverSettings.timeFormat } }, methods: { diff --git a/client/components/tables/podcast/LazyEpisodeRow.vue b/client/components/tables/podcast/LazyEpisodeRow.vue index ee189961..ae99e6d3 100644 --- a/client/components/tables/podcast/LazyEpisodeRow.vue +++ b/client/components/tables/podcast/LazyEpisodeRow.vue @@ -112,7 +112,7 @@ export default { return this.episode?.publishedAt }, dateFormat() { - return this.store.getters['getServerSetting']('dateFormat') + return this.store.state.serverSettings.dateFormat }, itemProgress() { return this.store.getters['user/getUserMediaProgress'](this.libraryItemId, this.episodeId) diff --git a/client/components/tables/podcast/LazyEpisodesTable.vue b/client/components/tables/podcast/LazyEpisodesTable.vue index d23ee3d3..b23cc560 100644 --- a/client/components/tables/podcast/LazyEpisodesTable.vue +++ b/client/components/tables/podcast/LazyEpisodesTable.vue @@ -239,10 +239,10 @@ export default { }) }, dateFormat() { - return this.$store.getters['getServerSetting']('dateFormat') + return this.$store.state.serverSettings.dateFormat }, timeFormat() { - return this.$store.getters['getServerSetting']('timeFormat') + return this.$store.state.serverSettings.timeFormat } }, methods: { diff --git a/client/components/ui/VueTrix.vue b/client/components/ui/VueTrix.vue index 0836df15..6a24f1d3 100644 --- a/client/components/ui/VueTrix.vue +++ b/client/components/ui/VueTrix.vue @@ -31,7 +31,7 @@ - + @@ -316,10 +316,6 @@ export default { if (this.$refs.trix && this.$refs.trix.blur) { this.$refs.trix.blur() } - }, - handleAttachmentAdd(event) { - // Prevent pasting in images/any files from the browser - event.attachment.remove() } }, mounted() { diff --git a/client/components/widgets/CronExpressionBuilder.vue b/client/components/widgets/CronExpressionBuilder.vue index 600ed81a..77b5a54c 100644 --- a/client/components/widgets/CronExpressionBuilder.vue +++ b/client/components/widgets/CronExpressionBuilder.vue @@ -85,7 +85,7 @@ export default { nextRun() { if (!this.cronExpression) return '' const parsed = this.$getNextScheduledDate(this.cronExpression) - return this.$formatJsDatetime(parsed, this.$store.getters['getServerSetting']('dateFormat'), this.$store.getters['getServerSetting']('timeFormat')) || '' + return this.$formatJsDatetime(parsed, this.$store.state.serverSettings.dateFormat, this.$store.state.serverSettings.timeFormat) || '' }, description() { if ((this.selectedInterval !== 'custom' || !this.selectedWeekdays.length) && this.selectedInterval !== 'daily') return '' diff --git a/client/components/widgets/EncoderOptionsCard.vue b/client/components/widgets/EncoderOptionsCard.vue index 977d766b..9306274d 100644 --- a/client/components/widgets/EncoderOptionsCard.vue +++ b/client/components/widgets/EncoderOptionsCard.vue @@ -143,18 +143,10 @@ export default { localStorage.setItem('embedMetadataCodec', val) }, getEncodingOptions() { - if (this.showAdvancedView) { - return { - codec: this.customCodec || this.selectedCodec || 'aac', - bitrate: this.customBitrate || this.selectedBitrate || '128k', - channels: this.customChannels || this.selectedChannels || 2 - } - } else { - return { - codec: this.selectedCodec || 'aac', - bitrate: this.selectedBitrate || '128k', - channels: this.selectedChannels || 2 - } + return { + codec: this.selectedCodec || 'aac', + bitrate: this.selectedBitrate || '128k', + channels: this.selectedChannels || 2 } }, setPreset() { @@ -170,7 +162,7 @@ export default { } else { // Find closest bitrate rounding up const bitratesToMatch = [32, 64, 128, 192] - const closestBitrate = bitratesToMatch.find((bitrate) => bitrate >= this.currentBitrate) || 192 + const closestBitrate = bitratesToMatch.find((bitrate) => bitrate >= this.currentBitrate) this.selectedBitrate = closestBitrate + 'k' } diff --git a/client/components/widgets/LoadingSpinner.vue b/client/components/widgets/LoadingSpinner.vue index 8f3de84a..a9c4ef47 100644 --- a/client/components/widgets/LoadingSpinner.vue +++ b/client/components/widgets/LoadingSpinner.vue @@ -248,4 +248,4 @@ export default { transform: scale(0); } } - + \ No newline at end of file diff --git a/client/components/widgets/SeriesInputWidget.vue b/client/components/widgets/SeriesInputWidget.vue index 3dab0605..916b108d 100644 --- a/client/components/widgets/SeriesInputWidget.vue +++ b/client/components/widgets/SeriesInputWidget.vue @@ -2,7 +2,7 @@
- +
@@ -18,7 +18,6 @@ export default { data() { return { selectedSeries: null, - originalSeriesSequence: null, showSeriesForm: false } }, @@ -60,7 +59,6 @@ export default { ..._series } - this.originalSeriesSequence = _series.sequence this.showSeriesForm = true }, addNewSeries() { @@ -70,7 +68,6 @@ export default { sequence: '' } - this.originalSeriesSequence = null this.showSeriesForm = true }, submitSeriesForm() { @@ -109,4 +106,4 @@ export default { } } } - + \ No newline at end of file diff --git a/client/cypress/tests/components/cards/LazySeriesCard.cy.js b/client/cypress/tests/components/cards/LazySeriesCard.cy.js index 12eec692..346259d2 100644 --- a/client/cypress/tests/components/cards/LazySeriesCard.cy.js +++ b/client/cypress/tests/components/cards/LazySeriesCard.cy.js @@ -40,7 +40,6 @@ describe('LazySeriesCard', () => { }, $store: { getters: { - getServerSetting: () => 'MM/dd/yyyy', 'user/getUserCanUpdate': true, 'user/getUserMediaProgress': (id) => null, 'user/getSizeMultiplier': 1, diff --git a/client/package-lock.json b/client/package-lock.json index db21b43f..56a98514 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1,12 +1,12 @@ { "name": "audiobookshelf-client", - "version": "2.25.1", + "version": "2.23.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "audiobookshelf-client", - "version": "2.25.1", + "version": "2.23.0", "license": "ISC", "dependencies": { "@nuxtjs/axios": "^5.13.6", diff --git a/client/package.json b/client/package.json index e8823f1b..a2bd7e62 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "audiobookshelf-client", - "version": "2.25.1", + "version": "2.23.0", "buildNumber": 1, "description": "Self-hosted audiobook and podcast client", "main": "index.js", diff --git a/client/pages/audiobook/_id/manage.vue b/client/pages/audiobook/_id/manage.vue index 40672af2..7afe12a9 100644 --- a/client/pages/audiobook/_id/manage.vue +++ b/client/pages/audiobook/_id/manage.vue @@ -28,14 +28,14 @@
-
{{ $strings.LabelMetaTag }}
-
{{ $strings.LabelValue }}
+
{{ $strings.LabelMetaTag }}
+
{{ $strings.LabelValue }}