From 988e6e849fb0dd89b32bc54deb51367967f90f01 Mon Sep 17 00:00:00 2001 From: Kylart Date: Tue, 26 Sep 2017 10:38:11 +0200 Subject: [PATCH] Fixed really weird bug where quality was not reset after download outside downloader --- components/magnetsModal.vue | 3 +++ store/modules/downloader/actions.js | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/components/magnetsModal.vue b/components/magnetsModal.vue index 1cbf28a..db4cef8 100644 --- a/components/magnetsModal.vue +++ b/components/magnetsModal.vue @@ -114,6 +114,9 @@ : !this.selected.includes(magnet) && this.selected.push(magnet) }) } + }, + beforeDestroy () { + console.log('Destroyed') } } diff --git a/store/modules/downloader/actions.js b/store/modules/downloader/actions.js index 99da62d..3fcbfb8 100644 --- a/store/modules/downloader/actions.js +++ b/store/modules/downloader/actions.js @@ -20,7 +20,7 @@ export default { const infos = { name: name, - quality: quality, + quality: quality || rootState.config.config.quality, fromEp: +fromEp, untilEp: +untilEp, fansub: rootState.config.config.fansub, @@ -61,7 +61,7 @@ export default { choice: 'pantsu' }) - if (status === 200) { + if (status === 200 && data.magnets.length) { log(`Request fulfilled!`) if (magnets === true) { @@ -84,6 +84,8 @@ export default { commit('setInfoSnackbar', 'Sorry. KawAnime was not able to get your torrents...', isRoot) } + } else { + commit('setInfoSnackbar', 'Could not find anything, please try again.', isRoot) } commit(failed ? 'toggleLoading' : 'resetForm')