@ctrl/qbittorrent 9.0.0 → 9.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
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
import { NormalizedTorrent } from '@ctrl/shared-torrent';
|
2
|
-
import { Torrent } from './types.js';
|
1
|
+
import { type NormalizedTorrent } from '@ctrl/shared-torrent';
|
2
|
+
import { type Torrent } from './types.js';
|
3
3
|
export declare function normalizeTorrentData(torrent: Torrent): NormalizedTorrent;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { TorrentState as NormalizedTorrentState } from '@ctrl/shared-torrent';
|
1
|
+
import { TorrentState as NormalizedTorrentState, } from '@ctrl/shared-torrent';
|
2
2
|
import { TorrentState } from './types.js';
|
3
3
|
export function normalizeTorrentData(torrent) {
|
4
4
|
let state = NormalizedTorrentState.unknown;
|
package/dist/src/qbittorrent.js
CHANGED
@@ -399,7 +399,7 @@ export class QBittorrent {
|
|
399
399
|
if (!isUint8Array(torrent)) {
|
400
400
|
torrent = stringToUint8Array(torrent);
|
401
401
|
}
|
402
|
-
torrentHash =
|
402
|
+
torrentHash = hash(torrent);
|
403
403
|
await this.addTorrent(torrent, torrentOptions);
|
404
404
|
}
|
405
405
|
return this.getTorrent(torrentHash);
|
@@ -539,7 +539,7 @@ export class QBittorrent {
|
|
539
539
|
redirect: 'manual',
|
540
540
|
retry: false,
|
541
541
|
timeout: this.config.timeout,
|
542
|
-
|
542
|
+
dispatcher: this.config.dispatcher,
|
543
543
|
});
|
544
544
|
if (!res.headers.get('set-cookie')?.length) {
|
545
545
|
throw new Error('Cookie not found. Auth Failed.');
|
@@ -588,8 +588,7 @@ export class QBittorrent {
|
|
588
588
|
// casting to json to avoid type error
|
589
589
|
responseType: isJson ? 'json' : 'text',
|
590
590
|
// allow proxy agent
|
591
|
-
|
592
|
-
agent: this.config.agent,
|
591
|
+
dispatcher: this.config.dispatcher,
|
593
592
|
});
|
594
593
|
return res;
|
595
594
|
}
|
package/dist/src/types.d.ts
CHANGED
@@ -538,6 +538,10 @@ export interface AddTorrentOptions {
|
|
538
538
|
* Category for the torrent
|
539
539
|
*/
|
540
540
|
category: string;
|
541
|
+
/**
|
542
|
+
* Tags for the torrent, split by ','
|
543
|
+
*/
|
544
|
+
tags: string;
|
541
545
|
/**
|
542
546
|
* Skip hash checking. Possible values are true, false (default)
|
543
547
|
*/
|
@@ -591,6 +595,10 @@ export interface AddMagnetOptions {
|
|
591
595
|
* Category for the torrent
|
592
596
|
*/
|
593
597
|
category: string;
|
598
|
+
/**
|
599
|
+
* Tags for the torrent, split by ','
|
600
|
+
*/
|
601
|
+
tags: string;
|
594
602
|
/**
|
595
603
|
* Skip hash checking. Possible values are true, false (default)
|
596
604
|
*/
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ctrl/qbittorrent",
|
3
|
-
"version": "9.
|
3
|
+
"version": "9.1.0",
|
4
4
|
"description": "TypeScript api wrapper for qbittorrent using got",
|
5
5
|
"author": "Scott Cooper <scttcper@gmail.com>",
|
6
6
|
"license": "MIT",
|
@@ -27,7 +27,7 @@
|
|
27
27
|
"lint:eslint": "eslint .",
|
28
28
|
"lint:fix": "pnpm run '/^(lint:biome|lint:eslint):fix$/'",
|
29
29
|
"lint:eslint:fix": "eslint . --fix",
|
30
|
-
"lint:biome:fix": "biome check . --
|
30
|
+
"lint:biome:fix": "biome check . --write",
|
31
31
|
"prepare": "npm run build",
|
32
32
|
"build": "tsc",
|
33
33
|
"build:docs": "typedoc",
|
@@ -37,26 +37,26 @@
|
|
37
37
|
},
|
38
38
|
"dependencies": {
|
39
39
|
"@ctrl/magnet-link": "^4.0.2",
|
40
|
-
"@ctrl/shared-torrent": "^6.
|
41
|
-
"@ctrl/torrent-file": "^4.
|
42
|
-
"cookie": "^0.
|
40
|
+
"@ctrl/shared-torrent": "^6.1.0",
|
41
|
+
"@ctrl/torrent-file": "^4.1.0",
|
42
|
+
"cookie": "^1.0.1",
|
43
43
|
"node-fetch-native": "^1.6.4",
|
44
|
-
"ofetch": "^1.
|
44
|
+
"ofetch": "^1.4.1",
|
45
45
|
"ufo": "^1.5.4",
|
46
46
|
"uint8array-extras": "^1.4.0"
|
47
47
|
},
|
48
48
|
"devDependencies": {
|
49
|
-
"@biomejs/biome": "1.
|
50
|
-
"@ctrl/eslint-config-biome": "4.
|
51
|
-
"@eslint/compat": "^1.
|
49
|
+
"@biomejs/biome": "1.9.4",
|
50
|
+
"@ctrl/eslint-config-biome": "4.2.11",
|
51
|
+
"@eslint/compat": "^1.2.2",
|
52
52
|
"@sindresorhus/tsconfig": "6.0.0",
|
53
|
-
"@types/cookie": "0.
|
54
|
-
"@types/node": "22.
|
55
|
-
"@vitest/coverage-v8": "2.
|
53
|
+
"@types/cookie": "1.0.0",
|
54
|
+
"@types/node": "22.9.0",
|
55
|
+
"@vitest/coverage-v8": "2.1.4",
|
56
56
|
"p-wait-for": "5.0.2",
|
57
|
-
"typedoc": "0.26.
|
58
|
-
"typescript": "5.
|
59
|
-
"vitest": "2.
|
57
|
+
"typedoc": "0.26.11",
|
58
|
+
"typescript": "5.6.3",
|
59
|
+
"vitest": "2.1.4"
|
60
60
|
},
|
61
61
|
"release": {
|
62
62
|
"branches": [
|