mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-03 00:06:46 +01:00
Update:Continue Reading shelf Remove from Continue Reading menu item
This commit is contained in:
parent
fbfc015d92
commit
9a617226b3
@ -16,7 +16,7 @@
|
||||
<!-- Alternate plain view -->
|
||||
<div v-else-if="isAlternativeBookshelfView" class="w-full mb-24">
|
||||
<template v-for="(shelf, index) in shelves">
|
||||
<widgets-item-slider v-if="shelf.type === 'book' || shelf.type === 'podcast'" :shelf-id="shelf.id" :key="index + '.'" :items="shelf.entities" :continue-listening-shelf="shelf.id === 'continue-listening'" :height="232 * sizeMultiplier" class="bookshelf-row pl-8 my-6" @selectEntity="(payload) => selectEntity(payload, index)">
|
||||
<widgets-item-slider v-if="shelf.type === 'book' || shelf.type === 'podcast'" :shelf-id="shelf.id" :key="index + '.'" :items="shelf.entities" :continue-listening-shelf="shelf.id === 'continue-listening' || shelf.id === 'continue-reading'" :height="232 * sizeMultiplier" class="bookshelf-row pl-8 my-6" @selectEntity="(payload) => selectEntity(payload, index)">
|
||||
<p class="font-semibold text-gray-100" :style="{ fontSize: sizeMultiplier + 'rem' }">{{ $strings[shelf.labelStringKey] }}</p>
|
||||
</widgets-item-slider>
|
||||
<widgets-episode-slider v-else-if="shelf.type === 'episode'" :key="index + '.'" :items="shelf.entities" :continue-listening-shelf="shelf.id === 'continue-listening'" :height="232 * sizeMultiplier" class="bookshelf-row pl-8 my-6" @selectEntity="(payload) => selectEntity(payload, index)">
|
||||
@ -36,7 +36,7 @@
|
||||
<!-- Regular bookshelf view -->
|
||||
<div v-else class="w-full">
|
||||
<template v-for="(shelf, index) in shelves">
|
||||
<app-book-shelf-row :key="index" :index="index" :shelf="shelf" :size-multiplier="sizeMultiplier" :book-cover-width="bookCoverWidth" :book-cover-aspect-ratio="coverAspectRatio" :continue-listening-shelf="shelf.id === 'continue-listening'" @selectEntity="(payload) => selectEntity(payload, index)" />
|
||||
<app-book-shelf-row :key="index" :index="index" :shelf="shelf" :size-multiplier="sizeMultiplier" :book-cover-width="bookCoverWidth" :book-cover-aspect-ratio="coverAspectRatio" :continue-listening-shelf="shelf.id === 'continue-listening' || shelf.id === 'continue-reading'" @selectEntity="(payload) => selectEntity(payload, index)" />
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
@ -286,7 +286,8 @@ export default {
|
||||
}
|
||||
if (user.mediaProgress.length) {
|
||||
const mediaProgressToHide = user.mediaProgress.filter((mp) => mp.hideFromContinueListening)
|
||||
this.removeItemsFromContinueListening(mediaProgressToHide)
|
||||
this.removeItemsFromContinueListeningReading(mediaProgressToHide, 'continue-listening')
|
||||
this.removeItemsFromContinueListeningReading(mediaProgressToHide, 'continue-reading')
|
||||
}
|
||||
},
|
||||
libraryItemAdded(libraryItem) {
|
||||
@ -357,8 +358,8 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
removeItemsFromContinueListening(mediaProgressItems) {
|
||||
const continueListeningShelf = this.shelves.find((s) => s.id === 'continue-listening')
|
||||
removeItemsFromContinueListeningReading(mediaProgressItems, categoryId) {
|
||||
const continueListeningShelf = this.shelves.find((s) => s.id === categoryId)
|
||||
if (continueListeningShelf) {
|
||||
if (continueListeningShelf.type === 'book') {
|
||||
continueListeningShelf.entities = continueListeningShelf.entities.filter((ent) => {
|
||||
@ -373,17 +374,6 @@ export default {
|
||||
})
|
||||
}
|
||||
}
|
||||
// this.shelves.forEach((shelf) => {
|
||||
// if (shelf.id == 'continue-listening') {
|
||||
// if (shelf.type == 'book') {
|
||||
// // Filter out books from continue listening shelf
|
||||
// shelf.entities = shelf.entities.filter((ent) => {
|
||||
// if (mediaProgressItems.some(mp => mp.libraryItemId === ent.id)) return false
|
||||
// return true
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
},
|
||||
authorUpdated(author) {
|
||||
this.shelves.forEach((shelf) => {
|
||||
|
@ -329,6 +329,9 @@ export default {
|
||||
if (this.episodeProgress) return this.episodeProgress
|
||||
return this.store.getters['user/getUserMediaProgress'](this.libraryItemId)
|
||||
},
|
||||
isEBookOnly() {
|
||||
return !this.numTracks && this.ebookFormat
|
||||
},
|
||||
useEBookProgress() {
|
||||
if (!this.userProgress || this.userProgress.progress) return false
|
||||
return this.userProgress.ebookProgress > 0
|
||||
@ -445,6 +448,7 @@ export default {
|
||||
}
|
||||
]
|
||||
if (this.continueListeningShelf) {
|
||||
|
||||
items.push({
|
||||
func: 'removeFromContinueListening',
|
||||
text: this.$strings.ButtonRemoveFromContinueListening
|
||||
@ -512,7 +516,7 @@ export default {
|
||||
if (this.continueListeningShelf) {
|
||||
items.push({
|
||||
func: 'removeFromContinueListening',
|
||||
text: this.$strings.ButtonRemoveFromContinueListening
|
||||
text: this.isEBookOnly ? this.$strings.ButtonRemoveFromContinueReading : this.$strings.ButtonRemoveFromContinueListening
|
||||
})
|
||||
}
|
||||
if (!this.isPodcast) {
|
||||
|
@ -55,6 +55,7 @@
|
||||
"ButtonRemoveAll": "Alles löschen",
|
||||
"ButtonRemoveAllLibraryItems": "Lösche alle Bibliothekseinträge",
|
||||
"ButtonRemoveFromContinueListening": "Lösche den Eintrag aus der Fortsetzungsliste",
|
||||
"ButtonRemoveFromContinueReading": "Remove from Continue Reading",
|
||||
"ButtonRemoveSeriesFromContinueSeries": "Lösche die Serie aus der Serienfortsetzungsliste",
|
||||
"ButtonReScan": "Neu scannen",
|
||||
"ButtonReset": "Zurücksetzen",
|
||||
|
@ -55,6 +55,7 @@
|
||||
"ButtonRemoveAll": "Remove All",
|
||||
"ButtonRemoveAllLibraryItems": "Remove All Library Items",
|
||||
"ButtonRemoveFromContinueListening": "Remove from Continue Listening",
|
||||
"ButtonRemoveFromContinueReading": "Remove from Continue Reading",
|
||||
"ButtonRemoveSeriesFromContinueSeries": "Remove Series from Continue Series",
|
||||
"ButtonReScan": "Re-Scan",
|
||||
"ButtonReset": "Reset",
|
||||
|
@ -55,6 +55,7 @@
|
||||
"ButtonRemoveAll": "Remover Todos",
|
||||
"ButtonRemoveAllLibraryItems": "Remover Todos los Elementos de la Biblioteca",
|
||||
"ButtonRemoveFromContinueListening": "Remover de Continuar Escuchando",
|
||||
"ButtonRemoveFromContinueReading": "Remove from Continue Reading",
|
||||
"ButtonRemoveSeriesFromContinueSeries": "Remover Serie de Continuar Series",
|
||||
"ButtonReScan": "Re-Escanear",
|
||||
"ButtonReset": "Reiniciar",
|
||||
|
@ -55,6 +55,7 @@
|
||||
"ButtonRemoveAll": "Supprimer tout",
|
||||
"ButtonRemoveAllLibraryItems": "Supprimer tous les articles de la bibliothèque",
|
||||
"ButtonRemoveFromContinueListening": "Ne plus continuer à écouter",
|
||||
"ButtonRemoveFromContinueReading": "Remove from Continue Reading",
|
||||
"ButtonRemoveSeriesFromContinueSeries": "Ne plus continuer à écouter la série",
|
||||
"ButtonReScan": "Nouvelle analyse",
|
||||
"ButtonReset": "Réinitialiser",
|
||||
|
@ -55,6 +55,7 @@
|
||||
"ButtonRemoveAll": "બધું કાઢી નાખો",
|
||||
"ButtonRemoveAllLibraryItems": "બધું પુસ્તકાલય વસ્તુઓ કાઢી નાખો",
|
||||
"ButtonRemoveFromContinueListening": "સાંભળતી પુસ્તકો માંથી કાઢી નાખો",
|
||||
"ButtonRemoveFromContinueReading": "Remove from Continue Reading",
|
||||
"ButtonRemoveSeriesFromContinueSeries": "સાંભળતી સિરીઝ માંથી કાઢી નાખો",
|
||||
"ButtonReScan": "ફરીથી સ્કેન કરો",
|
||||
"ButtonReset": "રીસેટ કરો",
|
||||
|
@ -55,6 +55,7 @@
|
||||
"ButtonRemoveAll": "सभी हटाएं",
|
||||
"ButtonRemoveAllLibraryItems": "पुस्तकालय की सभी आइटम हटाएं",
|
||||
"ButtonRemoveFromContinueListening": "सुनना जारी रखें से हटाएं",
|
||||
"ButtonRemoveFromContinueReading": "Remove from Continue Reading",
|
||||
"ButtonRemoveSeriesFromContinueSeries": "इस सीरीज को कंटिन्यू सीरीज से हटा दें",
|
||||
"ButtonReScan": "पुन: स्कैन करें",
|
||||
"ButtonReset": "रीसेट करें",
|
||||
|
@ -55,6 +55,7 @@
|
||||
"ButtonRemoveAll": "Ukloni sve",
|
||||
"ButtonRemoveAllLibraryItems": "Ukloni sve stvari iz biblioteke",
|
||||
"ButtonRemoveFromContinueListening": "Ukloni iz Nastavi slušati",
|
||||
"ButtonRemoveFromContinueReading": "Remove from Continue Reading",
|
||||
"ButtonRemoveSeriesFromContinueSeries": "Ukloni seriju iz Nastavi seriju",
|
||||
"ButtonReScan": "Skeniraj ponovno",
|
||||
"ButtonReset": "Poništi",
|
||||
|
@ -55,6 +55,7 @@
|
||||
"ButtonRemoveAll": "Rimuovi Tutto",
|
||||
"ButtonRemoveAllLibraryItems": "Rimuovi tutto il contenuto della libreria",
|
||||
"ButtonRemoveFromContinueListening": "Rimuovi per proseguire l'ascolto",
|
||||
"ButtonRemoveFromContinueReading": "Remove from Continue Reading",
|
||||
"ButtonRemoveSeriesFromContinueSeries": "Rimuovi la Serie per Continuarla",
|
||||
"ButtonReScan": "Ri-scansiona",
|
||||
"ButtonReset": "Reset",
|
||||
|
@ -55,6 +55,7 @@
|
||||
"ButtonRemoveAll": "Alles verwijderen",
|
||||
"ButtonRemoveAllLibraryItems": "Verwijder volledige bibliotheekinhoud",
|
||||
"ButtonRemoveFromContinueListening": "Vewijder uit Verder luisteren",
|
||||
"ButtonRemoveFromContinueReading": "Remove from Continue Reading",
|
||||
"ButtonRemoveSeriesFromContinueSeries": "Verwijder serie uit Serie vervolgen",
|
||||
"ButtonReScan": "Nieuwe scan",
|
||||
"ButtonReset": "Reset",
|
||||
|
@ -55,6 +55,7 @@
|
||||
"ButtonRemoveAll": "Usuń wszystko",
|
||||
"ButtonRemoveAllLibraryItems": "Usuń wszystkie elementy z biblioteki",
|
||||
"ButtonRemoveFromContinueListening": "Usuń z listy odtwarzania",
|
||||
"ButtonRemoveFromContinueReading": "Remove from Continue Reading",
|
||||
"ButtonRemoveSeriesFromContinueSeries": "Usuń serię z listy odtwarzania",
|
||||
"ButtonReScan": "Ponowne skanowanie",
|
||||
"ButtonReset": "Resetowanie",
|
||||
|
@ -55,6 +55,7 @@
|
||||
"ButtonRemoveAll": "Удалить всё",
|
||||
"ButtonRemoveAllLibraryItems": "Удалить все элементы библиотеки",
|
||||
"ButtonRemoveFromContinueListening": "Удалить из Продолжить слушать",
|
||||
"ButtonRemoveFromContinueReading": "Remove from Continue Reading",
|
||||
"ButtonRemoveSeriesFromContinueSeries": "Удалить серию из Продолжить серию",
|
||||
"ButtonReScan": "Пересканировать",
|
||||
"ButtonReset": "Сбросить",
|
||||
|
@ -55,6 +55,7 @@
|
||||
"ButtonRemoveAll": "移除所有",
|
||||
"ButtonRemoveAllLibraryItems": "移除所有媒体库项目",
|
||||
"ButtonRemoveFromContinueListening": "从继续收听中删除",
|
||||
"ButtonRemoveFromContinueReading": "Remove from Continue Reading",
|
||||
"ButtonRemoveSeriesFromContinueSeries": "从继续收听系列中删除",
|
||||
"ButtonReScan": "重新扫描",
|
||||
"ButtonReset": "重置",
|
||||
|
Loading…
Reference in New Issue
Block a user