A full-featured download manager.
fix: task stop seeding
Dr_rOot134d81b20589
diff --git a/src/renderer/components/Task/TaskItemActions.vue b/src/renderer/components/Task/TaskItemActions.vueindex cf9a3a42..e4209c3f 100644--- a/src/renderer/components/Task/TaskItemActions.vue+++ b/src/renderer/components/Task/TaskItemActions.vue@@ -233,10 +233,7 @@if (!this.isSeeder) {return}- this.$store.dispatch('task/pauseTask', this.task)- .then(() => {- this.$store.dispatch('task/resumeTask', this.task)- })+ this.$store.dispatch('task/stopSeeding', this.task)},pauseTask () {const { taskName } = thisdiff --git a/src/renderer/store/modules/task.js b/src/renderer/store/modules/task.jsindex 9d4590d7..92d837f8 100644--- a/src/renderer/store/modules/task.js+++ b/src/renderer/store/modules/task.js@@ -138,6 +138,13 @@ const actions = {dispatch('saveSession')})},+ stopSeeding ({ dispatch }, task) {+ const { gid } = task+ const options = {+ seedTime: 0+ }+ return dispatch('changeTaskOption', { gid, options })+ },removeTaskRecord ({ dispatch }, task) {const { gid, status } = taskif (['error', 'complete', 'removed'].indexOf(status) === -1) {