Skip to content

Commit

Permalink
fix: search results not loading until stopped (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
ulasozguler authored and WDaan committed Mar 13, 2022
1 parent 84750af commit 8b126d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/Modals/SearchModal/SearchModal.vue
Expand Up @@ -150,8 +150,8 @@ export default {
if (status === 'Stopped') {
clearInterval(this.search.interval)
this.search.interval = null
await this.getResults()
}
await this.getResults()
}, 500)
}
},
Expand All @@ -165,13 +165,13 @@ export default {
async getResults() {
const data = await qbit.getSearchResults(this.search.id)
this.search.results = data.results
this.loading = false
},
downloadTorrent(item) {
this.createModal('addModal', { initialMagnet: item.fileUrl })
},
stopSearch() {
qbit.stopSearch(this.search.id)
this.loading = false
},
close() {
this.dialog = false
Expand Down
3 changes: 1 addition & 2 deletions src/services/qbit.js
Expand Up @@ -393,8 +393,7 @@ class Qbit {

getSearchResults(id) {
return this.execute('post', '/search/results', {
id,
limit: 50
id
})
}
}
Expand Down

0 comments on commit 8b126d8

Please sign in to comment.