Skip to content

Commit 6540646

Browse files
committed
fix: add total_size to torrent details
1 parent b72ff8e commit 6540646

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

Diff for: .eslintrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ module.exports = {
1515
'no-await-in-loop': 0,
1616
'@typescript-eslint/camelcase': 0,
1717
'@typescript-eslint/promise-function-async': 0,
18+
'@typescript-eslint/unified-signatures': 0,
1819
},
1920
};

Diff for: src/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,8 @@ export class Deluge implements TorrentClient {
337337
'total_payload_upload',
338338
'next_announce',
339339
'tracker_status',
340+
'tracker',
341+
'comment',
340342
'num_pieces',
341343
'piece_length',
342344
'is_auto_managed',
@@ -361,6 +363,8 @@ export class Deluge implements TorrentClient {
361363
'time_added',
362364
'tracker_host',
363365
'save_path',
366+
'total_size',
367+
'num_files',
364368
'total_done',
365369
'total_uploaded',
366370
'max_download_speed',
@@ -542,6 +546,7 @@ export class Deluge implements TorrentClient {
542546
totalPeers: torrent.total_peers,
543547
totalSeeds: torrent.total_seeds,
544548
totalSelected: torrent.total_wanted,
549+
totalSize: torrent.total_size,
545550
totalUploaded: torrent.total_uploaded,
546551
totalDownloaded: torrent.total_done,
547552
};

Diff for: src/types.ts

+4
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,13 @@ export interface Torrent {
137137
max_upload_speed: number;
138138
eta: number;
139139
save_path: string;
140+
comment: string;
141+
num_files: number;
142+
total_size: number;
140143
progress: number;
141144
time_added: number;
142145
tracker_host: string;
146+
tracker: string;
143147
total_uploaded: number;
144148
total_done: number;
145149
total_wanted: number;

Diff for: test/index.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ describe('Deluge', () => {
9797
});
9898
it('should logout', async () => {
9999
const deluge = new Deluge({ baseUrl });
100-
await deluge.logout();
100+
await deluge.login();
101101
const success = await deluge.logout();
102102
expect(success).toBe(true);
103103
});

0 commit comments

Comments
 (0)