fix: Update Paramaters Sent to /torrents/renameFile (#470)

In v2.8.0 of the API, qbittorrent changed what parameters are required
for the /torrents/renameFile endpoint.  Instead of id, hash, and name,
the params are not hash, oldPath, and newPath.
This commit is contained in:
Devon Tingley 2022-09-10 04:23:33 -04:00 committed by GitHub
parent 7e5cc4891a
commit 1ccdf08b60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -216,7 +216,7 @@ export default {
this.togleEditing(item)
},
renameFile(item) {
qbit.renameFile(this.hash, item.id, item.newName)
qbit.renameFile(this.hash, item.name, item.newName)
item.name = item.newName
this.togleEditing(item)
},
@ -226,4 +226,4 @@ export default {
}
}
}
</script>
</script>

View file

@ -349,11 +349,11 @@ class Qbit {
return this.execute('post', `/torrents/${action}`, params)
}
renameFile(hash, id, name) {
renameFile(hash, oldPath, newPath) {
const params = {
hash,
id,
name
oldPath,
newPath
}
return this.execute('post', '/torrents/renameFile', params)