Torrent States#

class qbittorrentapi.definitions.TorrentStates(value)#

Bases: enum.Enum

Torrent States as defined by qBittorrent.

Definitions:
Usage
>>> from qbittorrentapi import Client, TorrentStates
>>> client = Client()
>>> # print torrent hashes for torrents that are downloading
>>> for torrent in client.torrents_info():
>>>     # check if torrent is downloading
>>>     if torrent.state_enum.is_downloading:
>>>         print(f'{torrent.hash} is downloading...')
>>>     # the appropriate enum member can be directly derived
>>>     state_enum = TorrentStates(torrent.state)
>>>     print(f'{torrent.hash}: {state_enum.value}')
ALLOCATING = 'allocating'#
CHECKING_DOWNLOAD = 'checkingDL'#
CHECKING_RESUME_DATA = 'checkingResumeData'#
CHECKING_UPLOAD = 'checkingUP'#
DOWNLOADING = 'downloading'#
ERROR = 'error'#
FORCED_DOWNLOAD = 'forcedDL'#
FORCED_METADATA_DOWNLOAD = 'forcedMetaDL'#
FORCED_UPLOAD = 'forcedUP'#
METADATA_DOWNLOAD = 'metaDL'#
MISSING_FILES = 'missingFiles'#
MOVING = 'moving'#
PAUSED_DOWNLOAD = 'pausedDL'#
PAUSED_UPLOAD = 'pausedUP'#
QUEUED_DOWNLOAD = 'queuedDL'#
QUEUED_UPLOAD = 'queuedUP'#
STALLED_DOWNLOAD = 'stalledDL'#
STALLED_UPLOAD = 'stalledUP'#
UNKNOWN = 'unknown'#
UPLOADING = 'uploading'#
property is_checking#

Returns True if the State is categorized as Checking.

property is_complete#

Returns True if the State is categorized as Complete.

property is_downloading#

Returns True if the State is categorized as Downloading.

property is_errored#

Returns True if the State is categorized as Errored.

property is_paused#

Returns True if the State is categorized as Paused.

property is_uploading#

Returns True if the State is categorized as Uploading.