mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2025-02-18 00:02:02 +03:00
fix: Trackers view (#700)
This commit is contained in:
parent
4b3e8a9eee
commit
ee4cb7ec1f
2 changed files with 11 additions and 4 deletions
|
@ -6,7 +6,7 @@
|
|||
<tbody>
|
||||
<tr v-for="item in items" :key="item.url">
|
||||
<td>
|
||||
<v-checkbox v-if="item.isSelectable" v-model="selectedTrackers" :value="item" hide-details class="pa-0 ma-0" color="accent" />
|
||||
<v-checkbox v-if="item.isSelectable" v-model="selectedTrackers" multiple :value="item" hide-details class="pa-0 ma-0" color="accent" />
|
||||
</td>
|
||||
<td>{{ item.tier }}</td>
|
||||
<td>{{ item.url }}</td>
|
||||
|
@ -120,10 +120,12 @@ export default {
|
|||
},
|
||||
async DeleteTrackers() {
|
||||
if (!this.selectedTrackers.length) return
|
||||
qbit.removeTorrentTrackers(
|
||||
|
||||
await qbit.removeTorrentTrackers(
|
||||
this.hash,
|
||||
this.selectedTrackers.map(t => t.url)
|
||||
)
|
||||
|
||||
this.selectedTrackers = []
|
||||
await this.getTorrentTrackers()
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import axios, { AxiosError } from 'axios'
|
||||
import axios from 'axios'
|
||||
import type { AxiosInstance } from 'axios'
|
||||
import type {
|
||||
ApplicationVersion,
|
||||
|
@ -349,7 +349,12 @@ export class QBitApi {
|
|||
}
|
||||
|
||||
async removeTorrentTrackers(hash: string, trackers: string[]): Promise<void> {
|
||||
await this.torrentAction('removeTrackers', [hash], { urls: trackers.join('|') })
|
||||
const params = {
|
||||
hash,
|
||||
urls: trackers.join('|')
|
||||
}
|
||||
|
||||
await this.execute(`/torrents/removeTrackers`, params)
|
||||
}
|
||||
|
||||
async addTorrentPeers(hashes: string[], peers: string[]): Promise<void> {
|
||||
|
|
Loading…
Add table
Reference in a new issue