diff --git a/src/Api.ts b/src/Api.ts index 5abec7e..e02a33a 100644 --- a/src/Api.ts +++ b/src/Api.ts @@ -83,6 +83,18 @@ class Api { return this.axios.post('/app/setPreferences', data); } + public setTorrentFilePriority(hash: string, idList: Array, priority: number) { + const idListStr = idList.join('|'); + const params: any = { + hash, + id: idListStr, + priority, + } + + const data = new URLSearchParams(params); + return this.axios.post(`/torrents/filePrio`, data).then(Api.handleResponse); + } + public getLogs(lastId?: number) { const params = { last_known_id: lastId, diff --git a/src/components/dialogs/TorrentContent.vue b/src/components/dialogs/TorrentContent.vue index fd2e962..36408cf 100644 --- a/src/components/dialogs/TorrentContent.vue +++ b/src/components/dialogs/TorrentContent.vue @@ -3,6 +3,9 @@