Class Deluge

Implements

  • TorrentClient

Constructors

  • Parameters

    • options: Partial<TorrentSettings> = {}

    Returns Deluge

Properties

config: TorrentSettings

Methods

  • Checks current session is valid

    Returns Promise<boolean>

    true if valid

  • Connects deluge and returns a list of available methods

    Parameters

    • OptionalselectedHost: string
    • hostIdx: number = 0

      index of host to use in result of get hosts

    Returns Promise<ListMethods>

  • Returns Promise<boolean>

  • Disconnects deluge - warning all instances connected to this client will also be disconnected. Other instances may also reconnect. Not really sure why you would want to disconnect

    Returns Promise<boolean>

  • Download a torrent from url, pass the result to Deluge.addTorrent

    Parameters

    • url: string
    • cookies: string = ''

    Returns Promise<string>

    file path

  • Returns Promise<AllClientData>

  • Parameters

    • plugins: string[]

    Returns Promise<PluginInfo>

  • Parameters

    • id: string

    Returns Promise<NormalizedTorrent>

  • Get list of files for a torrent

    Parameters

    • torrentId: string

    Returns Promise<TorrentFiles>

  • used to get torrent info before adding

    Parameters

    • tmpPath: string

      use path returned from upload torrent looks like '/tmp/delugeweb-DfEsgR/tmpD3rujY.torrent'

    Returns Promise<TorrentInfo>

  • get torrent state/status

    Parameters

    • torrentId: string
    • additionalFields: string[] = []

      fields ex - ['label']

    Returns Promise<TorrentStatus>

  • returns the version ex - 2.0.3-2-201906121747-ubuntu18.04.1

    Returns Promise<StringStatus>

  • Lists methods

    Parameters

    • auth: boolean = true

      disable or enable auth connection

    Returns Promise<ListMethods>

    a list of method names

  • Parameters

    • additionalFields: string[] = []
    • filter: Record<string, string> = {}

    Returns Promise<TorrentListResponse>

  • Login deluge

    Returns Promise<boolean>

    true if success

  • Logout deluge

    Returns Promise<boolean>

    true if success

  • Parameters

    • torrent: string | Uint8Array
    • options: Partial<AddTorrentOptions> = {}

    Returns Promise<NormalizedTorrent>

  • Parameters

    • torrentId: string

    Returns Promise<DefaultResponse>

  • Parameters

    • torrentId: string

    Returns Promise<DefaultResponse>

  • Parameters

    • torrentId: string

    Returns Promise<DefaultResponse>

  • Parameters

    • torrentId: string

      torrent id from list torrents

    • removeData: boolean = false

      (default: false) If true, remove the data from disk

    Returns Promise<BooleanStatus>

  • Type Parameters

    • T extends object

    Parameters

    • method: string
    • params: any[] = []
    • needsAuth: boolean = true
    • autoConnect: boolean = true

    Returns Promise<Promise<FetchResponse<T>>>

  • Returns void

  • Parameters

    • torrentId: string

    Returns Promise<DefaultResponse>

  • Parameters

    • torrentId: string
    • label: string

    Returns Promise<DefaultResponse>