Show / Hide Table of Contents

Class QBittorrentClientExtensions

Provides extension methods for IQBittorrentClient.

Inheritance
System.Object
QBittorrentClientExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: QBittorrent.Client
Assembly: QBittorrent.Client.dll
Syntax
public static class QBittorrentClientExtensions

Methods

| Improve this Doc View Source

AddTorrentPeerAsync(IQBittorrentClient2, IEnumerable<String>, IPEndPoint, CancellationToken)

Adds peer to the torrents.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public static Task<IReadOnlyDictionary<string, PeerAddResult>> AddTorrentPeerAsync(this IQBittorrentClient2 client, IEnumerable<string> hashes, IPEndPoint peer, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.Collections.Generic.IEnumerable<System.String> hashes

The torrent hashes.

System.Net.IPEndPoint peer

The peer to ban.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<System.String, PeerAddResult>>
| Improve this Doc View Source

AddTorrentPeerAsync(IQBittorrentClient2, IEnumerable<String>, String, CancellationToken)

Adds peer to the torrents.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public static Task<IReadOnlyDictionary<string, PeerAddResult>> AddTorrentPeerAsync(this IQBittorrentClient2 client, IEnumerable<string> hashes, string peer, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.Collections.Generic.IEnumerable<System.String> hashes

The torrent hashes.

System.String peer

The peer to ban in form ip:port.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<System.String, PeerAddResult>>
| Improve this Doc View Source

AddTorrentPeerAsync(IQBittorrentClient2, String, IPEndPoint, CancellationToken)

Adds peer to the torrent.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public static async Task<PeerAddResult> AddTorrentPeerAsync(this IQBittorrentClient2 client, string hash, IPEndPoint peer, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String hash

The torrent hash.

System.Net.IPEndPoint peer

The peer to ban.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<PeerAddResult>
| Improve this Doc View Source

AddTorrentPeerAsync(IQBittorrentClient2, String, String, CancellationToken)

Adds peer to the torrent.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public static async Task<PeerAddResult> AddTorrentPeerAsync(this IQBittorrentClient2 client, string hash, string peer, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String hash

The torrent hash.

System.String peer

The peer to ban in form ip:port.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<PeerAddResult>
| Improve this Doc View Source

AddTorrentPeersAsync(IQBittorrentClient2, String, IEnumerable<IPEndPoint>, CancellationToken)

Adds peers to the torrent.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public static async Task<PeerAddResult> AddTorrentPeersAsync(this IQBittorrentClient2 client, string hash, IEnumerable<IPEndPoint> peers, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String hash

The torrent hash.

System.Collections.Generic.IEnumerable<System.Net.IPEndPoint> peers

The list of peers to ban.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<PeerAddResult>
| Improve this Doc View Source

AddTorrentPeersAsync(IQBittorrentClient2, String, IEnumerable<String>, CancellationToken)

Adds peers to the torrent.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public static async Task<PeerAddResult> AddTorrentPeersAsync(this IQBittorrentClient2 client, string hash, IEnumerable<string> peers, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String hash

The torrent hash.

System.Collections.Generic.IEnumerable<System.String> peers

The list of peers to ban. The peers must be in form ip:port.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<PeerAddResult>
| Improve this Doc View Source

AddTorrentTagAsync(IQBittorrentClient2, IEnumerable<String>, String, CancellationToken)

Adds the tag to the torrents.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public static Task AddTorrentTagAsync(this IQBittorrentClient2 client, IEnumerable<string> hashes, string tag, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.Collections.Generic.IEnumerable<System.String> hashes

The torrent hashes.

System.String tag

The tag.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

AddTorrentTagAsync(IQBittorrentClient2, String, String, CancellationToken)

Adds the tag to the torrent.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public static Task AddTorrentTagAsync(this IQBittorrentClient2 client, string hash, string tag, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String hash

The torrent hash.

System.String tag

The tag.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

AddTorrentTagAsync(IQBittorrentClient2, String, CancellationToken)

Adds the tag to all torrents.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public static Task AddTorrentTagAsync(this IQBittorrentClient2 client, string tag, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String tag

The tag.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

AddTorrentTagsAsync(IQBittorrentClient2, String, IEnumerable<String>, CancellationToken)

Adds the tags to the torrent.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public static Task AddTorrentTagsAsync(this IQBittorrentClient2 client, string hash, IEnumerable<string> tags, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String hash

The torrent hash.

System.Collections.Generic.IEnumerable<System.String> tags

The tags.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

AddTrackerAsync(IQBittorrentClient, String, Uri, CancellationToken)

Adds the tracker to the torrent.

Declaration
public static Task AddTrackerAsync(this IQBittorrentClient client, string hash, Uri tracker, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient client

An IQBittorrentClient instance.

System.String hash

The torrent hash.

System.Uri tracker

The tracker.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

BanPeerAsync(IQBittorrentClient2, IPEndPoint, CancellationToken)

Bans a peer.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public static Task BanPeerAsync(this IQBittorrentClient2 client, IPEndPoint peer, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.Net.IPEndPoint peer

The peer to ban.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

BanPeerAsync(IQBittorrentClient2, String, CancellationToken)

Bans a peer.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public static Task BanPeerAsync(this IQBittorrentClient2 client, string peer, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String peer

The peer to ban in form ip:port.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

ChangeTorrentPriorityAsync(IQBittorrentClient, String, TorrentPriorityChange, CancellationToken)

Changes the torrent priority.

Declaration
public static Task ChangeTorrentPriorityAsync(this IQBittorrentClient client, string hash, TorrentPriorityChange change, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient client

An IQBittorrentClient instance.

System.String hash

The torrent hash.

TorrentPriorityChange change

The priority change.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

ClearTorrentTagsAsync(IQBittorrentClient2, String, CancellationToken)

Removes all tags from the torrent.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public static Task ClearTorrentTagsAsync(this IQBittorrentClient2 client, string hash, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String hash

The torrent hash.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

CreateTagAsync(IQBittorrentClient2, String, CancellationToken)

Creates the tag.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public static Task CreateTagAsync(this IQBittorrentClient2 client, string tag, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String tag

The list of the tags to create.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

DeleteAsync(IQBittorrentClient, String, Boolean, CancellationToken)

Deletes the torrent.

Declaration
public static Task DeleteAsync(this IQBittorrentClient client, string hash, bool deleteDownloadedData = false, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient client

An IQBittorrentClient instance.

System.String hash

The torrent hash.

System.Boolean deleteDownloadedData

true to delete the downloaded data.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

DeleteCategoryAsync(IQBittorrentClient, String, CancellationToken)

Deletes the category.

Declaration
public static Task DeleteCategoryAsync(this IQBittorrentClient client, string category, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient client

An IQBittorrentClient instance.

System.String category

The category name.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

DeleteTagAsync(IQBittorrentClient2, String, CancellationToken)

Deletes the tag.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public static Task DeleteTagAsync(this IQBittorrentClient2 client, string tag, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String tag

The list of the tags to delete.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

DeleteTorrentTagAsync(IQBittorrentClient2, IEnumerable<String>, String, CancellationToken)

Removes the specified tag from the torrents.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public static Task DeleteTorrentTagAsync(this IQBittorrentClient2 client, IEnumerable<string> hashes, string tag, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.Collections.Generic.IEnumerable<System.String> hashes

The torrent hashes.

System.String tag

The tag.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

DeleteTorrentTagAsync(IQBittorrentClient2, String, String, CancellationToken)

Removes the specified tag from the torrent.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public static Task DeleteTorrentTagAsync(this IQBittorrentClient2 client, string hash, string tag, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String hash

The torrent hash.

System.String tag

The tag.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

DeleteTorrentTagAsync(IQBittorrentClient2, String, CancellationToken)

Removes the specified tag from all torrents.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public static Task DeleteTorrentTagAsync(this IQBittorrentClient2 client, string tag, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String tag

The tag.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

DeleteTorrentTagsAsync(IQBittorrentClient2, String, IEnumerable<String>, CancellationToken)

Removes the specified tags from the torrent.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public static Task DeleteTorrentTagsAsync(this IQBittorrentClient2 client, string hash, IEnumerable<string> tags, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String hash

The torrent hash.

System.Collections.Generic.IEnumerable<System.String> tags

The tags.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

DeleteTrackerAsync(IQBittorrentClient2, String, Uri, CancellationToken)

Removes the trackers from the torrent.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.2.0")]
public static Task DeleteTrackerAsync(this IQBittorrentClient2 client, string hash, Uri trackerUrl, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String hash

The hash of the torrent.

System.Uri trackerUrl

The tracker URL you want to remove.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

DisableSearchPluginAsync(IQBittorrentClient2, String, CancellationToken)

Disables the search plugin.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
public static Task DisableSearchPluginAsync(this IQBittorrentClient2 client, string name, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String name

Name of the plugin to disable.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

EnableSearchPluginAsync(IQBittorrentClient2, String, CancellationToken)

Enables the search plugin.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
public static Task EnableSearchPluginAsync(this IQBittorrentClient2 client, string name, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String name

Name of the plugin to enable.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

GetNetworkInterfaceAddressesAsync(IQBittorrentClient2, NetInterface, CancellationToken)

Gets the list of IP addresses for all available network interfaces.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public static Task<IReadOnlyList<string>> GetNetworkInterfaceAddressesAsync(this IQBittorrentClient2 client, NetInterface networkInterface, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

NetInterface networkInterface

The network interface to retrieve the IP addresses for. If null, the result will include IP addresses for all interfaces.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<System.String>>
| Improve this Doc View Source

GetNetworkInterfaceAddressesAsync(IQBittorrentClient2, CancellationToken)

Gets the list of IP addresses for all available network interfaces.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public static Task<IReadOnlyList<string>> GetNetworkInterfaceAddressesAsync(this IQBittorrentClient2 client, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<System.String>>
| Improve this Doc View Source

GetTorrentDownloadLimitAsync(IQBittorrentClient, String, CancellationToken)

Gets the torrent download speed limit.

Declaration
public static Task<long?> GetTorrentDownloadLimitAsync(this IQBittorrentClient client, string hash, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient client

An IQBittorrentClient instance.

System.String hash

The torrent hash.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<System.Nullable<System.Int64>>
| Improve this Doc View Source

GetTorrentUploadLimitAsync(IQBittorrentClient, String, CancellationToken)

Gets the torrent upload speed limit.

Declaration
public static Task<long?> GetTorrentUploadLimitAsync(this IQBittorrentClient client, string hash, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient client

An IQBittorrentClient instance.

System.String hash

The torrent hash.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<System.Nullable<System.Int64>>
| Improve this Doc View Source

InstallSearchPluginAsync(IQBittorrentClient2, Uri, CancellationToken)

Installs the search plugins.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
public static Task InstallSearchPluginAsync(this IQBittorrentClient2 client, Uri source, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.Uri source

URL of the plugins to install.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
Remarks

Plugin can be installed from the local file system using file:/// URI as source.

| Improve this Doc View Source

ReannounceAsync(IQBittorrentClient2, String, CancellationToken)

Reannounces the torrent.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.0.2")]
public static Task ReannounceAsync(this IQBittorrentClient2 client, string hash, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String hash

The torrent hash.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

SetAutomaticTorrentManagementAsync(IQBittorrentClient, String, Boolean, CancellationToken)

Sets the automatic torrent management.

Declaration
public static Task SetAutomaticTorrentManagementAsync(this IQBittorrentClient client, string hash, bool enabled, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient client

An IQBittorrentClient instance.

System.String hash

The torrent hash.

System.Boolean enabled
System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

SetForceStartAsync(IQBittorrentClient, String, Boolean, CancellationToken)

Sets the force start.

Declaration
public static Task SetForceStartAsync(this IQBittorrentClient client, string hash, bool enabled, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient client

An IQBittorrentClient instance.

System.String hash

The torrent hash.

System.Boolean enabled
System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

SetLocationAsync(IQBittorrentClient, String, String, CancellationToken)

Sets the location of torrent.

Declaration
public static Task SetLocationAsync(this IQBittorrentClient client, string hash, string newLocation, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient client

An IQBittorrentClient instance.

System.String hash

The torrent hash.

System.String newLocation

The new location.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

SetShareLimitsAsync(IQBittorrentClient2, String, Double, TimeSpan, CancellationToken)

Sets the torrent share limits.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.0.1")]
public static Task SetShareLimitsAsync(this IQBittorrentClient2 client, string hash, double ratio, TimeSpan seedingTime, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String hash

The torrent hash.

System.Double ratio

The ratio limit. Use Global in order to use global limit. Use Unlimited in order to set no limit.

System.TimeSpan seedingTime

The seeding time limit. Use Global in order to use global limit. Use Unlimited in order to set no limit.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
See Also
ShareLimits.Ratio
ShareLimits.SeedingTime
| Improve this Doc View Source

SetShareLimitsAsync(IQBittorrentClient2, String, Double, TimeSpan, TimeSpan, CancellationToken)

Sets the torrent share limits.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.9.2")]
public static Task SetShareLimitsAsync(this IQBittorrentClient2 client, string hash, double ratio, TimeSpan seedingTime, TimeSpan inactiveSeedingTime, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String hash

The torrent hash.

System.Double ratio

The ratio limit. Use Global in order to use global limit. Use Unlimited in order to set no limit.

System.TimeSpan seedingTime

The seeding time limit. Use Global in order to use global limit. Use Unlimited in order to set no limit.

System.TimeSpan inactiveSeedingTime

The inactive seeding time limit. Use Global in order to use global limit. Use Unlimited in order to set no limit.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
See Also
ShareLimits.Ratio
ShareLimits.SeedingTime
| Improve this Doc View Source

SetSuperSeedingAsync(IQBittorrentClient, String, Boolean, CancellationToken)

Sets the super seeding.

Declaration
public static Task SetSuperSeedingAsync(this IQBittorrentClient client, string hash, bool enabled, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient client

An IQBittorrentClient instance.

System.String hash

The torrent hash.

System.Boolean enabled
System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

SetTorrentCategoryAsync(IQBittorrentClient, String, String, CancellationToken)

Sets the torrent category.

Declaration
public static Task SetTorrentCategoryAsync(this IQBittorrentClient client, string hash, string category, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient client

An IQBittorrentClient instance.

System.String hash

The torrent hash.

System.String category

The category.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

SetTorrentDownloadLimitAsync(IQBittorrentClient, String, Int64, CancellationToken)

Sets the torrent download speed limit.

Declaration
public static Task SetTorrentDownloadLimitAsync(this IQBittorrentClient client, string hash, long limit, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient client

An IQBittorrentClient instance.

System.String hash

The torrent hash.

System.Int64 limit

The limit.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

SetTorrentUploadLimitAsync(IQBittorrentClient, String, Int64, CancellationToken)

Sets the torrent upload speed limit.

Declaration
public static Task SetTorrentUploadLimitAsync(this IQBittorrentClient client, string hash, long limit, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient client

An IQBittorrentClient instance.

System.String hash

The torrent hash.

System.Int64 limit

The limit.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

StartSearchAsync(IQBittorrentClient2, String, Boolean, String, CancellationToken)

Starts torrent search job using all or enabled plugins.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
public static Task<int> StartSearchAsync(this IQBittorrentClient2 client, string pattern, bool disabledPluginsToo = false, string category = "all", CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String pattern

Pattern to search for (e.g. "Ubuntu 18.04").

System.Boolean disabledPluginsToo

false to search using all enabled plugins; true to search using all (enabled and disabled) plugins.

System.String category

Categories to limit your search to (e.g. "legittorrents"). Also supports "all"

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<System.Int32>

The ID of the search job.

| Improve this Doc View Source

StartSearchAsync(IQBittorrentClient2, String, String, String, CancellationToken)

Starts torrent search job.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
public static Task<int> StartSearchAsync(this IQBittorrentClient2 client, string pattern, string plugin, string category = "all", CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String pattern

Pattern to search for (e.g. "Ubuntu 18.04").

System.String plugin

Plugin to use for searching (e.g. "legittorrents").

System.String category

Categories to limit your search to (e.g. "legittorrents"). Available categories depend on the specified plugin. Also supports "all"

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<System.Int32>

The ID of the search job.

| Improve this Doc View Source

ToggleFirstLastPiecePrioritizedAsync(IQBittorrentClient, String, CancellationToken)

Toggles the first and last piece priority.

Declaration
public static Task ToggleFirstLastPiecePrioritizedAsync(this IQBittorrentClient client, string hash, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient client

An IQBittorrentClient instance.

System.String hash

The torrent hash.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

ToggleSequentialDownloadAsync(IQBittorrentClient, String, CancellationToken)

Toggles the sequential download.

Declaration
public static Task ToggleSequentialDownloadAsync(this IQBittorrentClient client, string hash, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient client

An IQBittorrentClient instance.

System.String hash

The torrent hash.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

UninstallSearchPluginAsync(IQBittorrentClient2, String, CancellationToken)

Uninstalls the search plugins.

Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
public static Task UninstallSearchPluginAsync(this IQBittorrentClient2 client, string name, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
IQBittorrentClient2 client

An IQBittorrentClient2 instance.

System.String name

Name of the plugin to uninstall.

System.Threading.CancellationToken token

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018 Pavel Fedarovich