diff --git a/build/debian/DEBIAN/preinst b/build/debian/DEBIAN/preinst index bf4a3b172..0ad58d94d 100644 --- a/build/debian/DEBIAN/preinst +++ b/build/debian/DEBIAN/preinst @@ -5,7 +5,7 @@ set -o pipefail FFMPEG_INSTALL_DIR="/usr/lib/audiobookshelf-ffmpeg" DEFAULT_DATA_DIR="/usr/share/audiobookshelf" CONFIG_PATH="/etc/default/audiobookshelf" -DEFAULT_PORT=7331 +DEFAULT_PORT=13378 DEFAULT_HOST="0.0.0.0" diff --git a/client/assets/app.css b/client/assets/app.css index f9999c7aa..e870e7664 100644 --- a/client/assets/app.css +++ b/client/assets/app.css @@ -22,6 +22,10 @@ #bookshelf { height: calc(100% - 40px); background-image: linear-gradient(to right bottom, #2e2e2e, #303030, #313131, #333333, #353535, #343434, #323232, #313131, #2c2c2c, #282828, #232323, #1f1f1f); + + /* For Firefox */ + scrollbar-width: thin; + scrollbar-color: #855620 rgba(0, 0, 0, 0); } .bookshelf-row { diff --git a/client/components/app/Appbar.vue b/client/components/app/Appbar.vue index 0d63eccce..cc417739b 100644 --- a/client/components/app/Appbar.vue +++ b/client/components/app/Appbar.vue @@ -3,7 +3,7 @@
- + @@ -12,10 +12,10 @@ - +
- logo_dev + logo_dev cast @@ -158,7 +158,7 @@ export default { var newIsFinished = !this.selectedIsFinished var updateProgressPayloads = this.selectedLibraryItems.map((lid) => { return { - id: lid, + libraryItemId: lid, isFinished: newIsFinished } }) diff --git a/client/components/app/BookShelfRow.vue b/client/components/app/BookShelfRow.vue index 41ef38f77..2c2ae60ab 100644 --- a/client/components/app/BookShelfRow.vue +++ b/client/components/app/BookShelfRow.vue @@ -17,6 +17,11 @@
+
+ +
@@ -66,6 +69,7 @@ export default { isPlaying: false, currentTime: 0, showSleepTimerModal: false, + showPlayerQueueItemsModal: false, sleepTimerSet: false, sleepTimerTime: 0, sleepTimerRemaining: 0, @@ -138,9 +142,39 @@ export default { podcastAuthor() { if (!this.isPodcast) return null return this.mediaMetadata.author || 'Unknown' + }, + playerQueueItems() { + return this.$store.state.playerQueueItems || [] } }, methods: { + mediaFinished(libraryItemId, episodeId) { + // Play next item in queue + if (!this.playerQueueItems.length || !this.$store.state.playerQueueAutoPlay) { + // TODO: Set media finished flag so play button will play next queue item + return + } + var currentQueueIndex = this.playerQueueItems.findIndex((i) => { + if (episodeId) return i.libraryItemId === libraryItemId && i.episodeId === episodeId + return i.libraryItemId === libraryItemId + }) + if (currentQueueIndex < 0) { + console.error('Media finished not found in queue', this.playerQueueItems) + return + } + if (currentQueueIndex === this.playerQueueItems.length - 1) { + console.log('Finished last item in queue') + return + } + const nextItemInQueue = this.playerQueueItems[currentQueueIndex + 1] + if (nextItemInQueue) { + this.playLibraryItem({ + libraryItemId: nextItemInQueue.libraryItemId, + episodeId: nextItemInQueue.episodeId || null, + queueItems: this.playerQueueItems + }) + } + }, setPlaying(isPlaying) { this.isPlaying = isPlaying this.$store.commit('setIsPlaying', isPlaying) @@ -313,6 +347,7 @@ export default { } }, sessionOpen(session) { + // For opening session on init (temporarily unused) this.$store.commit('setMediaPlaying', { libraryItem: session.libraryItem, episodeId: session.episodeId @@ -376,7 +411,8 @@ export default { if (!libraryItem) return this.$store.commit('setMediaPlaying', { libraryItem, - episodeId + episodeId, + queueItems: payload.queueItems || [] }) this.$nextTick(() => { if (this.$refs.audioPlayer) this.$refs.audioPlayer.checkUpdateChapterTrack() diff --git a/client/components/cards/GroupCard.vue b/client/components/cards/GroupCard.vue index ff12c5616..954e3f695 100644 --- a/client/components/cards/GroupCard.vue +++ b/client/components/cards/GroupCard.vue @@ -1,26 +1,18 @@ @@ -31,11 +23,8 @@ export default { type: Object, default: () => null }, - width: { - type: Number, - default: 120 - }, - isCategorized: Boolean, + width: Number, + height: Number, bookCoverAspectRatio: Number }, data() { @@ -43,23 +32,7 @@ export default { isHovering: false } }, - watch: { - width(newVal) { - this.$nextTick(() => { - if (this.$refs.groupcover) { - this.$refs.groupcover.init() - } - }) - } - }, computed: { - seriesId() { - return this.groupEncode - }, - labelFontSize() { - if (this.coverWidth < 160) return 0.75 - return 0.875 - }, currentLibraryId() { return this.$store.state.libraries.currentLibraryId }, @@ -70,29 +43,11 @@ export default { return this._group.type }, groupTo() { - if (this.groupType === 'series') { - return `/library/${this.currentLibraryId}/series/${this._group.id}` - } else if (this.groupType === 'collection') { - return `/collection/${this._group.id}` - } else { - return `/library/${this.currentLibraryId}/bookshelf?filter=tags.${this.groupEncode}` - } - }, - squareAspectRatio() { - return this.bookCoverAspectRatio === 1 - }, - coverWidth() { - return this.width * 2 - }, - coverHeight() { - return this.width * this.bookCoverAspectRatio + return `/library/${this.currentLibraryId}/bookshelf?filter=${this.filter}` }, sizeMultiplier() { - var baseSize = this.squareAspectRatio ? 192 : 120 - return this.width / baseSize - }, - paddingX() { - return 16 * this.sizeMultiplier + if (this.bookCoverAspectRatio === 1) return this.width / (120 * 1.6 * 2) + return this.width / 240 }, bookItems() { return this._group.books || [] diff --git a/client/components/cards/LazyBookCard.vue b/client/components/cards/LazyBookCard.vue index 8ae16daec..be101e820 100644 --- a/client/components/cards/LazyBookCard.vue +++ b/client/components/cards/LazyBookCard.vue @@ -39,7 +39,7 @@
-