Skip to content

Commit 0a3806d

Browse files
committed
what
1 parent 912b906 commit 0a3806d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Diff for: src/deluge.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -255,16 +255,19 @@ export class Deluge implements TorrentClient {
255255
config: Partial<AddTorrentOptions> = {},
256256
): Promise<AddTorrentResponse> {
257257
let path: string;
258-
// Example temp path: /run/deluged-temp/delugeweb-s0jy917j/ubuntu-20.10-desktop-amd64.iso.torrent
259258
if (isUint8Array(torrent) || !torrent.startsWith('/tmp/') || !torrent.includes('delugeweb-')) {
259+
console.log({ torrent });
260260
const upload = await this.upload(torrent);
261261
if (!upload.success || !upload.files.length) {
262262
throw new Error('Failed to upload');
263263
}
264264

265265
path = upload.files[0];
266266
} else {
267-
/** Assume paths starting with /tmp/ are from {@link Deluge.addTorrent} */
267+
/**
268+
* Assume paths starting with /tmp/ are from {@link Deluge.addTorrent}
269+
* Example temp path: /run/deluged-temp/delugeweb-s0jy917j/ubuntu-20.10-desktop-amd64.iso.torrent
270+
*/
268271
path = torrent;
269272
}
270273

0 commit comments

Comments
 (0)