Added retry function for failed downloads
This commit is contained in:
		
							parent
							
								
									cef3e3d8d4
								
							
						
					
					
						commit
						399b6a9c82
					
				| @ -173,7 +173,7 @@ export default { | ||||
| 		onResultIconClick() { | ||||
| 			if (this.isDeterminateStatus) { | ||||
| 				if (this.finishedWithFails) { | ||||
| 					this.$emit('show-errors', this.queueItem) | ||||
| 					this.$emit('retry-download', this.queueItem.uuid) | ||||
| 				} | ||||
| 
 | ||||
| 				if (this.queueItem.status === 'downloading') { | ||||
|  | ||||
| @ -59,6 +59,7 @@ | ||||
| 				:show-tags="showTags" | ||||
| 				@show-errors="showErrorsTab" | ||||
| 				@remove-item="onRemoveItem" | ||||
| 				@retry-download="onRetryDownload" | ||||
| 			/> | ||||
| 		</div> | ||||
| 	</section> | ||||
| @ -70,7 +71,7 @@ import QueueItem from '@components/downloads/QueueItem.vue' | ||||
| 
 | ||||
| import { socket } from '@/utils/socket' | ||||
| import { toast } from '@/utils/toasts' | ||||
| import { fetchData } from '@/utils/api' | ||||
| import { fetchData, postToServer } from '@/utils/api' | ||||
| 
 | ||||
| const tabMinWidth = 250 | ||||
| const tabMaxWidth = 500 | ||||
| @ -153,6 +154,10 @@ export default { | ||||
| 		onRemoveItem(uuid) { | ||||
| 			socket.emit('removeFromQueue', uuid) | ||||
| 		}, | ||||
| 		onRetryDownload(uuid) { | ||||
| 			console.log("Retry", uuid) | ||||
| 			postToServer('retryDownload', {uuid}) | ||||
| 		}, | ||||
| 		setTabWidth(newWidth) { | ||||
| 			if (undefined === newWidth) { | ||||
| 				this.$refs.container.style.width = '' | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user