Class CreateTorrentRequest
Represents a request to create a new torrent download.
public sealed record CreateTorrentRequest : IEquatable<CreateTorrentRequest>
- Inheritance
-
CreateTorrentRequest
- Implements
- Inherited Members
Remarks
Either Magnet or File must be provided, but not both. The File property is excluded from JSON serialization because this request is sent as multipart form data.
Properties
AddOnlyIfCached
Gets a value indicating whether to only add the torrent if it is already cached, or null to use the default behavior.
[JsonPropertyName("add_only_if_cached")]
public bool? AddOnlyIfCached { get; init; }
Property Value
- bool?
AllowZip
Gets a value indicating whether to allow zipping the completed download, or null to use the default behavior.
[JsonPropertyName("allow_zip")]
public bool? AllowZip { get; init; }
Property Value
- bool?
AsQueued
Gets a value indicating whether to add the torrent as a queued download, or null to start immediately.
[JsonPropertyName("as_queued")]
public bool? AsQueued { get; init; }
Property Value
- bool?
File
Gets the raw torrent file bytes, or null if a magnet URI is provided instead.
[JsonIgnore]
public byte[]? File { get; init; }
Property Value
- byte[]
Remarks
This property is excluded from JSON serialization and is handled separately as a file upload in multipart form data requests.
Magnet
Gets the magnet URI of the torrent to download, or null if a torrent file is provided instead.
[JsonPropertyName("magnet")]
public string? Magnet { get; init; }
Property Value
Name
Gets an optional override name for the torrent, or null to use the default name from the torrent metadata.
[JsonPropertyName("name")]
public string? Name { get; init; }
Property Value
Seed
Gets the preferred seeding behavior after download completion, or null to use the user's default setting.
[JsonPropertyName("seed")]
public SeedPreference? Seed { get; init; }