@ctrl/qbittorrent
    Preparing search index...

    Class QBittorrent

    Implements

    • TorrentClient
    Index

    Constructors

    • Parameters

      • options: Partial<TorrentClientConfig> = {}

      Returns QBittorrent

    Properties

    config: TorrentClientConfig
    state: QBittorrentState = {}

    Methods

    • Parameters

      • urls: string

        URLs separated with newlines

      • options: Partial<AddMagnetOptions> = {}

      Returns Promise<boolean>

    • Parameters

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

      Returns Promise<boolean>

    • Export the state of the client as JSON

      Returns JsonifyObject<
          {
              auth?: { expires: Date; sid: string };
              version?: { isVersion5OrHigher: boolean; version: string };
          },
      >

    • Returns all torrent data. Data has been normalized

      Returns Promise<AllClientData>

    • Returns Promise<string>

    • Get default save path

      Returns Promise<string>

    • Parameters

      • hash: string

      Returns Promise<NormalizedTorrent>

    • Torrents list

      Parameters

      • __namedParameters: {
            category?: string;
            filter?: TorrentFilters;
            hashes?: string | string[];
            includeTrackers?: boolean;
            isPrivate?: boolean;
            limit?: number;
            offset?: number;
            reverse?: boolean;
            sort?: string;
            tag?: string;
        } = {}
        • Optionalcategory?: string
        • Optionalfilter?: TorrentFilters
        • Optionalhashes?: string | string[]
        • OptionalincludeTrackers?: boolean
        • OptionalisPrivate?: boolean

          Maps to private query parameter. Renamed to avoid conflict with private keyword.

        • Optionallimit?: number
        • Optionaloffset?: number
        • Optionalreverse?: boolean
        • Optionalsort?: string
        • Optionaltag?: string

      Returns Promise<Torrent[]>

      list of torrents

    • Returns boolean

    • Parameters

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

      Returns Promise<NormalizedTorrent>

    • Parameters

      • hashes: string | string[]

      Returns Promise<boolean>

      Alias for stopTorrent.

    • Parameters

      • hash: string

        Hash for desired torrent

      • oldPath: string

        id of the file to be renamed

      • newPath: string

        new name to be assigned to the file

      Returns Promise<boolean>

    • Type Parameters

      • T

      Parameters

      • path: string
      • method: "GET" | "POST"
      • Optionalparams: Record<string, string | number>
      • Optionalbody: URLSearchParams | FormData
      • headers: Record<string, string> = {}
      • isJson: boolean = true

      Returns Promise<T>

    • helper function to remove torrent category

      Parameters

      • hashes: string | string[]

      Returns Promise<boolean>

    • Parameters

      • hashes: string | string[]

      Returns Promise<boolean>

      Alias for startTorrent.

    • Parameters

      Returns Promise<boolean>

    • Parameters

      • hash: string

      Returns Promise<TorrentFile[]>

    • Returns Promise<string>

    • Create a new QBittorrent client from a state

      Parameters

      • config: Readonly<TorrentClientConfig>
      • state: Readonly<
            JsonifyObject<
                {
                    auth?: { expires: Date; sid: string };
                    version?: { isVersion5OrHigher: boolean; version: string };
                },
            >,
        >

      Returns QBittorrent