|
@ -4,10 +4,9 @@ import MagnetUri from "magnet-uri"; |
|
|
import WebTorrent from "webtorrent-hybrid"; |
|
|
import WebTorrent from "webtorrent-hybrid"; |
|
|
import parseTorrent from "parse-torrent"; |
|
|
import parseTorrent from "parse-torrent"; |
|
|
import { extname, join, sep } from "path"; |
|
|
import { extname, join, sep } from "path"; |
|
|
import Torrent from "../database/entities/Torrent"; |
|
|
|
|
|
import rimraf from "rimraf"; |
|
|
import rimraf from "rimraf"; |
|
|
|
|
|
import Torrent from "../database/entities/Torrent"; |
|
|
import { ISerializedTorrent, TorrentState } from "../common"; |
|
|
import { ISerializedTorrent, TorrentState } from "../common"; |
|
|
import { Database } from "."; |
|
|
|
|
|
|
|
|
|
|
|
interface IAddOptions { |
|
|
interface IAddOptions { |
|
|
downloadPath?: string; |
|
|
downloadPath?: string; |
|
@ -69,6 +68,7 @@ export class TorrentClient extends InternalService |
|
|
* Start the torrent client |
|
|
* Start the torrent client |
|
|
*/ |
|
|
*/ |
|
|
public start() { |
|
|
public start() { |
|
|
|
|
|
console.log("Loading torrents..."); |
|
|
this.loadTorrents(); |
|
|
this.loadTorrents(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|