diff --git a/src/components/downloads/QueueItem.vue b/src/components/downloads/QueueItem.vue index 397aa42..fbe67a5 100644 --- a/src/components/downloads/QueueItem.vue +++ b/src/components/downloads/QueueItem.vue @@ -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') { diff --git a/src/components/downloads/TheDownloadBar.vue b/src/components/downloads/TheDownloadBar.vue index cceadd9..3fe8ff3 100644 --- a/src/components/downloads/TheDownloadBar.vue +++ b/src/components/downloads/TheDownloadBar.vue @@ -59,6 +59,7 @@ :show-tags="showTags" @show-errors="showErrorsTab" @remove-item="onRemoveItem" + @retry-download="onRetryDownload" /> @@ -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 = ''