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