@ctrl/qbittorrent 4.0.2 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/src/qbittorrent.d.ts +4 -0
- package/dist/src/qbittorrent.js +11 -0
- package/package.json +4 -4
package/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# qBittorrent [](https://www.npmjs.com/package/@ctrl/qbittorrent) [](https://circleci.com/gh/scttcper/qbittorrent) [](https://codecov.io/gh/scttcper/qbittorrent)
|
1
|
+
# qBittorrent [](https://www.npmjs.com/package/@ctrl/qbittorrent) [](https://circleci.com/gh/scttcper/qbittorrent) [](https://codecov.io/gh/scttcper/qbittorrent)
|
2
2
|
|
3
3
|
> TypeScript api wrapper for [qBittorrent](https://www.qbittorrent.org/) using [got](https://github.com/sindresorhus/got)
|
4
4
|
|
@@ -160,6 +160,10 @@ export declare class QBittorrent implements TorrentClient {
|
|
160
160
|
* @param name new name to be assigned to the file
|
161
161
|
*/
|
162
162
|
renameFile(hash: string, id: number, name: string): Promise<boolean>;
|
163
|
+
/**
|
164
|
+
* {@link https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1)#rename-folder}
|
165
|
+
*/
|
166
|
+
renameFolder(hash: string, oldPath: string, newPath: string): Promise<boolean>;
|
163
167
|
/**
|
164
168
|
* @param urls URLs separated with newlines
|
165
169
|
* @param options
|
package/dist/src/qbittorrent.js
CHANGED
@@ -449,6 +449,17 @@ export class QBittorrent {
|
|
449
449
|
await this.request('/torrents/renameFile', 'POST', undefined, form, undefined, false);
|
450
450
|
return true;
|
451
451
|
}
|
452
|
+
/**
|
453
|
+
* {@link https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1)#rename-folder}
|
454
|
+
*/
|
455
|
+
async renameFolder(hash, oldPath, newPath) {
|
456
|
+
const form = new FormData();
|
457
|
+
form.append('hash', hash);
|
458
|
+
form.append('oldPath', oldPath);
|
459
|
+
form.append('newPath', newPath);
|
460
|
+
await this.request('/torrents/renameFolder', 'POST', undefined, form, undefined, false);
|
461
|
+
return true;
|
462
|
+
}
|
452
463
|
/**
|
453
464
|
* @param urls URLs separated with newlines
|
454
465
|
* @param options
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ctrl/qbittorrent",
|
3
|
-
"version": "4.0
|
3
|
+
"version": "4.1.0",
|
4
4
|
"description": "TypeScript api wrapper for qbittorrent using got",
|
5
5
|
"author": "Scott Cooper <scttcper@gmail.com>",
|
6
6
|
"license": "MIT",
|
@@ -42,13 +42,13 @@
|
|
42
42
|
"devDependencies": {
|
43
43
|
"@ctrl/eslint-config": "3.4.6",
|
44
44
|
"@sindresorhus/tsconfig": "3.0.1",
|
45
|
-
"@types/node": "18.0.
|
45
|
+
"@types/node": "18.0.3",
|
46
46
|
"@types/tough-cookie": "4.0.2",
|
47
47
|
"c8": "7.11.3",
|
48
48
|
"p-wait-for": "4.1.0",
|
49
|
-
"typedoc": "0.23.
|
49
|
+
"typedoc": "0.23.7",
|
50
50
|
"typescript": "4.7.4",
|
51
|
-
"vitest": "0.
|
51
|
+
"vitest": "0.18.0"
|
52
52
|
},
|
53
53
|
"release": {
|
54
54
|
"branches": [
|