enum

QBittorrent::Model::TorrentState

Inherits Enum < Comparable < Value < Object

Torrent state string (TorrentInfo#state), qBittorrent 5.x values.

5.x renamed the paused states: pausedUP/pausedDL became stoppedUP/stoppedDL. This enum's canonical wire form is the 5.x stopped* spelling, but #from_api? also accepts the legacy 4.x paused* tokens as aliases so older/mixed builds still decode.

Constants

Error = 0
MissingFiles = 1
Uploading = 2
StoppedUP = 3
QueuedUP = 4
StalledUP = 5
CheckingUP = 6
ForcedUP = 7
Allocating = 8
Downloading = 9
MetaDL = 10
StoppedDL = 11
QueuedDL = 12
StalledDL = 13
CheckingDL = 14
ForcedDL = 15
CheckingResumeData = 16
Moving = 17
Unknown = 18

Constructors

new(pull : JSON::PullParser) : self

Strict decode: raises on an unrecognised API string.

Source

Class methods

from_api?(value : String) : self | Nil

Parses an API string to a member, or nil if unrecognised. Accepts the legacy 4.x pausedUP/pausedDL tokens as aliases for the 5.x stoppedUP/stoppedDL members. ameba:disable Metrics/CyclomaticComplexity

Source

Instance methods

allocating?

Returns true if this enum value equals Allocating

Source
checking_dl?

Returns true if this enum value equals CheckingDL

Source
checking_resume_data?

Returns true if this enum value equals CheckingResumeData

Source
checking_up?

Returns true if this enum value equals CheckingUP

Source
downloading?

Returns true if this enum value equals Downloading

Source
error?

Returns true if this enum value equals Error

Source
forced_dl?

Returns true if this enum value equals ForcedDL

Source
forced_up?

Returns true if this enum value equals ForcedUP

Source
meta_dl?

Returns true if this enum value equals MetaDL

Source
missing_files?

Returns true if this enum value equals MissingFiles

Source
moving?

Returns true if this enum value equals Moving

Source
queued_dl?

Returns true if this enum value equals QueuedDL

Source
queued_up?

Returns true if this enum value equals QueuedUP

Source
stalled_dl?

Returns true if this enum value equals StalledDL

Source
stalled_up?

Returns true if this enum value equals StalledUP

Source
stopped_dl?

Returns true if this enum value equals StoppedDL

Source
stopped_up?

Returns true if this enum value equals StoppedUP

Source
to_api

Exact API string for this state (5.x spelling).

Source
to_json(json : JSON::Builder) : Nil

Serializes to the exact API string (e.g. "stalledUP").

Source
unknown?

Returns true if this enum value equals Unknown

Source
uploading?

Returns true if this enum value equals Uploading

Source