mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Initialise the selected provider to the default for the library when the batch quick match is first opened or if the user has switched libraries.
This commit is contained in:
		
							parent
							
								
									9983fe7d66
								
							
						
					
					
						commit
						11e3cf4f19
					
				| @ -54,8 +54,10 @@ export default { | ||||
|   data() { | ||||
|     return { | ||||
|       processing: false, | ||||
|       isScrollable: false, | ||||
|       lastUsedLibrary: undefined, | ||||
|       options: { | ||||
|         provider: 'google', | ||||
|         provider: undefined, | ||||
|         overrideDetails: true, | ||||
|         overrideCover: true, | ||||
|         overrideDefaults: true | ||||
| @ -66,6 +68,13 @@ export default { | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   watch: { | ||||
|     show: { | ||||
|       handler(newVal) { | ||||
|         this.init() | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   computed: { | ||||
|     show: { | ||||
|       get() { | ||||
| @ -90,9 +99,20 @@ export default { | ||||
|     providers() { | ||||
|       if (this.isPodcast) return this.$store.state.scanners.podcastProviders | ||||
|       return this.$store.state.scanners.providers | ||||
|     } | ||||
|     }, | ||||
|     libraryProvider() { | ||||
|       return this.$store.getters['libraries/getLibraryProvider'](this.currentLibraryId) || 'google' | ||||
|     }, | ||||
|   }, | ||||
|   methods: { | ||||
|     init() { | ||||
|       // 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.options.lastUsedLibrary != this.currentLibraryId)) { | ||||
|         this.options.lastUsedLibrary = this.currentLibraryId | ||||
|         this.options.provider = this.libraryProvider; | ||||
|       } | ||||
|     }, | ||||
|     doBatchQuickMatch() { | ||||
|       if (!this.selectedBookIds.length) return | ||||
|       if (this.processing) return | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user