Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: search results not loading until search stopped #391

Merged
merged 1 commit into from Mar 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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