Skip to content

qBittorrentService

adborbas edited this page Jun 5, 2022 · 1 revision

qBittorrentService

public protocol qBittorrentService 

Requirements

torrents(hash:​)

List of torrents managed by the client.

func torrents(hash: String?) -> AnyPublisher<[TorrentInfo], qBittorrentWebAPIError>

Parameters

  • hash: The hash of the torrent filtered for.

addTorrent(torrentFile:​configuration:​)

Adds a torrent to manage by the client.

func addTorrent(torrentFile: URL, configuration: AddTorrentConfiguration?) -> AnyPublisher<String, qBittorrentWebAPIError>

Parameters

  • torrentFile: URL of the torrent file to add.
  • configuration: Configuration for the new torrent.

deleteTorrent(hash:​deleteFiles:​)

Deletes a torrent.

func deleteTorrent(hash: String, deleteFiles: Bool) -> AnyPublisher<String, qBittorrentWebAPIError>

Parameters

  • hash: The hash of the torrent.
  • deleteFiles: true if the torrent's content should be deleted from the disk; false otherwise.

categories()

List of categories of the client.

func categories() -> AnyPublisher<[TorrentCategory], qBittorrentWebAPIError>

appPreferences()

Preferences of the client.

func appPreferences() -> AnyPublisher<AppPreferences, qBittorrentWebAPIError>

torrentGenericProperties(hash:​)

Generic properties of a torrent.

func torrentGenericProperties(hash: String) -> AnyPublisher<TorrentGenericProperties, qBittorrentWebAPIError>

Parameters

  • hash: The hash of the torrent.

torrentContent(hash:​)

Content properties of a torrent.

func torrentContent(hash: String) -> AnyPublisher<[TorrentContent], qBittorrentWebAPIError>

Parameters

  • hash: The hash of the torrent.

setFilePriority(hash:​files:​priority:​)

Set the priority for file(s).

func setFilePriority(hash: String, files: Set<Int>, priority: TorrentContent.Priority) ->  AnyPublisher<String, qBittorrentWebAPIError>

Parameters

  • hash: The hash of the torrent.
  • files: Indexes of the files that the priority should be set.
  • priority: The new priority to apply.

webAPIVersion()

Returns the Web API version.

func webAPIVersion() -> AnyPublisher<Semver, qBittorrentWebAPIError>

Clone this wiki locally