Class QBittorrentClient
Provides access to qBittorrent remote API.
Inheritance
Inherited Members
Namespace: QBittorrent.Client
Assembly: QBittorrent.Client.dll
Syntax
public class QBittorrentClient : IDisposable, IQBittorrentClient2, IQBittorrentClient
Constructors
| Improve this Doc View SourceQBittorrentClient(Uri)
Initializes a new instance of the QBittorrentClient class.
Declaration
public QBittorrentClient(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uri | qBittorrent remote server URI. |
QBittorrentClient(Uri, ApiLevel)
Initializes a new instance of the QBittorrentClient class.
Declaration
public QBittorrentClient(Uri uri, ApiLevel apiLevel)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uri | qBittorrent remote server URI. |
ApiLevel | apiLevel | qBittorrent API level. |
QBittorrentClient(Uri, ApiLevel, HttpMessageHandler, Boolean)
Initializes a new instance of the QBittorrentClient class.
Declaration
public QBittorrentClient(Uri uri, ApiLevel apiLevel, HttpMessageHandler handler, bool disposeHandler)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uri | qBittorrent remote server URI. |
ApiLevel | apiLevel | qBittorrent API level. |
System.Net.Http.HttpMessageHandler | handler | Custom HTTP message handler. |
System.Boolean | disposeHandler | The value indicating whether the |
QBittorrentClient(Uri, HttpMessageHandler, Boolean)
Initializes a new instance of the QBittorrentClient class.
Declaration
public QBittorrentClient(Uri uri, HttpMessageHandler handler, bool disposeHandler)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uri | qBittorrent remote server URI. |
System.Net.Http.HttpMessageHandler | handler | Custom HTTP message handler. |
System.Boolean | disposeHandler | The value indicating whether the |
Fields
| Improve this Doc View SourceNewApiLegacyFallbackVersion
The legacy API version returned by qBittorrent 4.2 or later.
Declaration
public const int NewApiLegacyFallbackVersion = 25
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
| Improve this Doc View SourceDefaultRequestHeaders
Gets the headers which should be sent with each request.
Declaration
public HttpRequestHeaders DefaultRequestHeaders { get; }
Property Value
Type | Description |
---|---|
System.Net.Http.Headers.HttpRequestHeaders |
Timeout
Gets or sets the timespan to wait before the request times out.
Declaration
public TimeSpan Timeout { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
Methods
| Improve this Doc View SourceAddCategoryAsync(String, String, CancellationToken)
Adds the category.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.0")]
public Task AddCategoryAsync(string category, string savePath, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | category | The category name. |
System.String | savePath | The save path for the torrents belonging to this category. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
AddCategoryAsync(String, CancellationToken)
Adds the category.
Declaration
public Task AddCategoryAsync(string category, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | category | The category name. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
AddRssFeedAsync(Uri, String, CancellationToken)
Adds the RSS feed.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.0")]
public Task AddRssFeedAsync(Uri url, string path = "", CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Uri | url | The URL of the RSS feed. |
System.String | path | The full path of added folder. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
AddRssFolderAsync(String, CancellationToken)
Adds the RSS folder.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.0")]
public Task AddRssFolderAsync(string path, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Full path of added folder. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
AddTorrentPeersAsync(IEnumerable<String>, IEnumerable<IPEndPoint>, CancellationToken)
Adds peers to the torrents.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public Task<IReadOnlyDictionary<string, PeerAddResult>> AddTorrentPeersAsync(IEnumerable<string> hashes, IEnumerable<IPEndPoint> peers, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
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<System.Collections.Generic.IReadOnlyDictionary<System.String, PeerAddResult>> |
AddTorrentPeersAsync(IEnumerable<String>, IEnumerable<String>, CancellationToken)
Adds peers to the torrents.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public Task<IReadOnlyDictionary<string, PeerAddResult>> AddTorrentPeersAsync(IEnumerable<string> hashes, IEnumerable<string> peers, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Collections.Generic.IEnumerable<System.String> | peers | The list of peers to ban. The peers must be in form |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<System.String, PeerAddResult>> |
AddTorrentsAsync(AddTorrentFilesRequest, CancellationToken)
Adds the torrent files to download.
Declaration
public Task AddTorrentsAsync(AddTorrentFilesRequest request, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
AddTorrentFilesRequest | request | The request. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
AddTorrentsAsync(AddTorrentsRequest, CancellationToken)
Adds the torrents to download.
Declaration
[ApiLevel(ApiLevel.V2)]
public Task AddTorrentsAsync(AddTorrentsRequest request, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
AddTorrentsRequest | request | The request. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
AddTorrentsAsync(AddTorrentUrlsRequest, CancellationToken)
Adds the torrent URLs or magnet-links to download.
Declaration
public Task AddTorrentsAsync(AddTorrentUrlsRequest request, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
AddTorrentUrlsRequest | request | The request. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
AddTorrentTagsAsync(IEnumerable<String>, IEnumerable<String>, CancellationToken)
Adds the tags to the torrents.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public Task AddTorrentTagsAsync(IEnumerable<string> hashes, IEnumerable<string> tags, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Collections.Generic.IEnumerable<System.String> | tags | The tags. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
AddTorrentTagsAsync(IEnumerable<String>, CancellationToken)
Adds the tags to all torrents.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public Task AddTorrentTagsAsync(IEnumerable<string> tags, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | tags | The tags. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
AddTrackersAsync(String, IEnumerable<Uri>, CancellationToken)
Adds the trackers to the torrent.
Declaration
public Task AddTrackersAsync(string hash, IEnumerable<Uri> trackers, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The torrent hash. |
System.Collections.Generic.IEnumerable<System.Uri> | trackers | The trackers. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
BanPeersAsync(IEnumerable<IPEndPoint>, CancellationToken)
Bans peers.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public Task BanPeersAsync(IEnumerable<IPEndPoint> peers, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
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 |
BanPeersAsync(IEnumerable<String>, CancellationToken)
Bans peers.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public Task BanPeersAsync(IEnumerable<string> peers, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | peers | The list of peers to ban. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ChangeTorrentPriorityAsync(TorrentPriorityChange, CancellationToken)
Changes the torrent priority for all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
public Task ChangeTorrentPriorityAsync(TorrentPriorityChange change, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
TorrentPriorityChange | change | The priority change. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ChangeTorrentPriorityAsync(IEnumerable<String>, TorrentPriorityChange, CancellationToken)
Changes the torrent priority.
Declaration
public Task ChangeTorrentPriorityAsync(IEnumerable<string> hashes, TorrentPriorityChange change, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
TorrentPriorityChange | change | The priority change. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ClearTorrentTagsAsync(IEnumerable<String>, CancellationToken)
Removes all tags from the torrents.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public Task ClearTorrentTagsAsync(IEnumerable<string> hashes, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ClearTorrentTagsAsync(CancellationToken)
Removes all tags from all torrents.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public Task ClearTorrentTagsAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
CreateTagsAsync(IEnumerable<String>, CancellationToken)
Creates the tags.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public Task CreateTagsAsync(IEnumerable<string> tags, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | tags | The list of the tags to create. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
DeleteAsync(Boolean, CancellationToken)
Deletes all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
public Task DeleteAsync(bool deleteDownloadedData = false, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | deleteDownloadedData | true to delete the downloaded data. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
DeleteAsync(IEnumerable<String>, Boolean, CancellationToken)
Deletes the torrents.
Declaration
public Task DeleteAsync(IEnumerable<string> hashes, bool deleteDownloadedData = false, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Boolean | deleteDownloadedData | true to delete the downloaded data. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
DeleteCategoriesAsync(IEnumerable<String>, CancellationToken)
Deletes the categories.
Declaration
public Task DeleteCategoriesAsync(IEnumerable<string> categories, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | categories | The list of categories' names. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
DeleteRssAutoDownloadingRuleAsync(String, CancellationToken)
Deletes the RSS auto-downloading rule.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.0")]
public Task DeleteRssAutoDownloadingRuleAsync(string name, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The rule name. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
DeleteRssItemAsync(String, CancellationToken)
Removes the RSS folder or feed.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.0")]
public Task DeleteRssItemAsync(string path, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The full path of removed folder or feed. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
DeleteSearchAsync(Int32, CancellationToken)
Deletes the search job with the specified id
.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
public Task DeleteSearchAsync(int id, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | The ID of the search job. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
DeleteTagsAsync(IEnumerable<String>, CancellationToken)
Deletes the tags.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public Task DeleteTagsAsync(IEnumerable<string> tags, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | tags | The list of the tags to delete. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
DeleteTorrentTagsAsync(IEnumerable<String>, IEnumerable<String>, CancellationToken)
Removes the specified tags from the torrents.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public Task DeleteTorrentTagsAsync(IEnumerable<string> hashes, IEnumerable<string> tags, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Collections.Generic.IEnumerable<System.String> | tags | The tags. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
If the list of tags is empty, this method is no op.
DeleteTorrentTagsAsync(IEnumerable<String>, CancellationToken)
Removes the specified tags from all torrents.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public Task DeleteTorrentTagsAsync(IEnumerable<string> tags, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | tags | The tags. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
If the list of tags is empty, this method is no op.
DeleteTrackersAsync(String, IEnumerable<Uri>, CancellationToken)
Removes the trackers from the torrent.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.2.0")]
public Task DeleteTrackersAsync(string hash, IEnumerable<Uri> trackerUrls, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The hash of the torrent. |
System.Collections.Generic.IEnumerable<System.Uri> | trackerUrls | The tracker URLs you want to remove. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
DisableSearchPluginsAsync(IEnumerable<String>, CancellationToken)
Disables the search plugins.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
public Task DisableSearchPluginsAsync(IEnumerable<string> names, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | names | Names of the plugins to disable. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Dispose()
Declaration
public void Dispose()
EditCategoryAsync(String, String, CancellationToken)
Changes the category save path.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.0")]
public Task EditCategoryAsync(string category, string savePath, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | category | The category name. |
System.String | savePath | The save path for the torrents belonging to this category. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
EditTrackerAsync(String, Uri, Uri, CancellationToken)
Changes tracker URL.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.2.0")]
public Task EditTrackerAsync(string hash, Uri trackerUrl, Uri newTrackerUrl, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The hash of the torrent. |
System.Uri | trackerUrl | The tracker URL you want to edit. |
System.Uri | newTrackerUrl | The new URL to replace the |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
EnableSearchPluginsAsync(IEnumerable<String>, CancellationToken)
Enables the search plugins.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
public Task EnableSearchPluginsAsync(IEnumerable<string> names, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | names | Names of the plugins to enable. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
GetAlternativeSpeedLimitsEnabledAsync(CancellationToken)
Gets the value indicating whether the alternative speed limits are enabled.
Declaration
public async Task<bool> GetAlternativeSpeedLimitsEnabledAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
GetApiVersionAsync(CancellationToken)
Gets the current API version of the server.
Declaration
public async Task<ApiVersion> GetApiVersionAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ApiVersion> |
Remarks
For qBittorrent versions before 4.1.0 this method returns version 1.x
where x
is the value returned by GetLegacyApiVersionAsync(CancellationToken) method.
For qBittorrent version starting from 4.1.0 this method returns version x.y
or x.y.z
where x >= 2
.
GetBuildInfoAsync(CancellationToken)
Gets the build information.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public Task<BuildInfo> GetBuildInfoAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<BuildInfo> |
GetCategoriesAsync(CancellationToken)
Gets all categories.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
public Task<IReadOnlyDictionary<string, Category>> GetCategoriesAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<System.String, Category>> |
GetDefaultSavePathAsync(CancellationToken)
Get the path to the folder where the downloaded files are saved by default.
Declaration
public async Task<string> GetDefaultSavePathAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> |
GetGlobalDownloadLimitAsync(CancellationToken)
Gets the global download speed limit.
Declaration
public Task<long?> GetGlobalDownloadLimitAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Nullable<System.Int64>> |
GetGlobalTransferInfoAsync(CancellationToken)
Gets the global transfer information.
Declaration
public async Task<GlobalTransferInfo> GetGlobalTransferInfoAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<GlobalTransferInfo> |
GetGlobalUploadLimitAsync(CancellationToken)
Gets the global upload speed limit.
Declaration
public Task<long?> GetGlobalUploadLimitAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Nullable<System.Int64>> |
GetLegacyApiVersionAsync(CancellationToken)
Gets the current API version of the server for qBittorrent versions up to 4.0.4.
Declaration
public Task<int> GetLegacyApiVersionAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> |
Remarks
Starting from version 4.2 qBittorrent does not return a legacy version. But in order to retain compatibility, this library will return NewApiLegacyFallbackVersion.
GetLegacyMinApiVersionAsync(CancellationToken)
Get the minimum API version supported by server. Any application designed to work with an API version greater than or equal to the minimum API version is guaranteed to work.
Declaration
public async Task<int> GetLegacyMinApiVersionAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> |
Remarks
Starting from version 4.2 qBittorrent does not return a legacy version. But in order to retain compatibility, this library will return NewApiLegacyFallbackVersion.
GetLogAsync(TorrentLogSeverity, Int32, CancellationToken)
Gets the server log.
Declaration
public async Task<IEnumerable<TorrentLogEntry>> GetLogAsync(TorrentLogSeverity severity = TorrentLogSeverity.All, int afterId = -1, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
TorrentLogSeverity | severity | The severity of log entries to return. All by default. |
System.Int32 | afterId | Return the entries with the ID greater than the specified one. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<TorrentLogEntry>> |
GetMatchingRssArticlesAsync(String, CancellationToken)
Returns all articles that match a rule by feed name.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.5.1")]
public Task<IReadOnlyDictionary<string, IReadOnlyList<string>>> GetMatchingRssArticlesAsync(string ruleName, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | ruleName | Rule name. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<System.String, System.Collections.Generic.IReadOnlyList<System.String>>> |
GetNetworkInterfaceAddressesAsync(String, CancellationToken)
Gets the list of network interface IP addresses.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public Task<IReadOnlyList<string>> GetNetworkInterfaceAddressesAsync(string networkInterfaceId, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | networkInterfaceId | The network interface id to retrieve the IP addresses for. If null or empty, 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>> |
GetNetworkInterfacesAsync(CancellationToken)
Gets the list of network interfaces on the qBittorrent machine.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public Task<IReadOnlyList<NetInterface>> GetNetworkInterfacesAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<NetInterface>> |
GetPartialDataAsync(Int32, CancellationToken)
Gets the partial data.
Declaration
public async Task<PartialData> GetPartialDataAsync(int responseId = 0, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | responseId | The response identifier. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<PartialData> |
GetPeerLogAsync(Int32, CancellationToken)
Gets the peer log.
Declaration
[ApiLevel(ApiLevel.V2)]
public async Task<IEnumerable<PeerLogEntry>> GetPeerLogAsync(int afterId = -1, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | afterId | |
System.Threading.CancellationToken | token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<PeerLogEntry>> |
GetPeerPartialDataAsync(String, Int32, CancellationToken)
Gets the peer partial data.
Declaration
public Task<PeerPartialData> GetPeerPartialDataAsync(string hash, int responseId = 0, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | |
System.Int32 | responseId | The response identifier. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<PeerPartialData> |
GetPreferencesAsync(CancellationToken)
Gets qBittorrent preferences.
Declaration
public async Task<Preferences> GetPreferencesAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Preferences> |
GetQBittorrentVersionAsync(CancellationToken)
Gets the qBittorrent version.
Declaration
public async Task<Version> GetQBittorrentVersionAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Version> |
GetRssAutoDownloadingRulesAsync(CancellationToken)
Gets the RSS auto-downloading rules.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.0")]
public Task<IReadOnlyDictionary<string, RssAutoDownloadingRule>> GetRssAutoDownloadingRulesAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<System.String, RssAutoDownloadingRule>> |
GetRssItemsAsync(Boolean, CancellationToken)
Gets all RSS folders and feeds.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.0")]
public async Task<RssFolder> GetRssItemsAsync(bool withData = false, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | withData | true if you need current feed articles. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<RssFolder> |
GetSearchCategoriesAsync(String, CancellationToken)
Gets the search categories.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
[Deprecated("2.6")]
public Task<IReadOnlyList<string>> GetSearchCategoriesAsync(string plugin, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | plugin | Name of the plugin (e.g. "legittorrents"). Also supports All and Enabled. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<System.String>> | The list of the search categories. |
GetSearchPluginsAsync(CancellationToken)
Gets the installed search plugins.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
public Task<IReadOnlyList<SearchPlugin>> GetSearchPluginsAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<SearchPlugin>> | The list of the search plugins. |
GetSearchResultsAsync(Int32, Int32, Int32, CancellationToken)
Gets the results of the search job with the specified id
.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
public Task<SearchResults> GetSearchResultsAsync(int id, int offset = 0, int limit = 0, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | The ID of the search job. |
System.Int32 | offset | Result to start at. A negative number means count backwards (e.g. -2 returns the 2 most recent results). |
System.Int32 | limit | The maximal number of results to return. 0 or negative means no limit. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<SearchResults> |
GetSearchStatusAsync(Int32, CancellationToken)
Gets the status of the search jobs with the specified id
.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
public Task<SearchStatus> GetSearchStatusAsync(int id, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | The ID of the search job. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<SearchStatus> | The object containing the status and the number of found torrents. |
GetSearchStatusAsync(CancellationToken)
Gets the status of all search jobs.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
public Task<IReadOnlyList<SearchStatus>> GetSearchStatusAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<SearchStatus>> | The list containing statuses and the number of found torrents for each search job. |
GetTagsAsync(CancellationToken)
Gets the list of the tags.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
public Task<IReadOnlyList<string>> GetTagsAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<System.String>> |
GetTorrentContentsAsync(String, IEnumerable<String>, CancellationToken)
Gets the torrent contents.
Declaration
public Task<IReadOnlyList<TorrentContent>> GetTorrentContentsAsync(string hash, IEnumerable<string> indexes, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The torrent hash. |
System.Collections.Generic.IEnumerable<System.String> | indexes | The indexes of the files you want to retrieve. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<TorrentContent>> |
GetTorrentContentsAsync(String, CancellationToken)
Gets the torrent contents.
Declaration
public Task<IReadOnlyList<TorrentContent>> GetTorrentContentsAsync(string hash, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The torrent hash. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<TorrentContent>> |
GetTorrentDownloadLimitAsync(IEnumerable<String>, CancellationToken)
Gets the torrent download speed limit.
Declaration
public Task<IReadOnlyDictionary<string, long?>> GetTorrentDownloadLimitAsync(IEnumerable<string> hashes, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<System.String, System.Nullable<System.Int64>>> |
GetTorrentListAsync(TorrentListQuery, CancellationToken)
Gets the torrent list.
Declaration
public Task<IReadOnlyList<TorrentInfo>> GetTorrentListAsync(TorrentListQuery query = null, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
TorrentListQuery | query | The query. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<TorrentInfo>> |
GetTorrentPiecesHashesAsync(String, CancellationToken)
Gets the hashes of the torrent pieces.
Declaration
public Task<IReadOnlyList<string>> GetTorrentPiecesHashesAsync(string hash, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The torrent hash. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<System.String>> |
GetTorrentPiecesStatesAsync(String, CancellationToken)
Gets the states of the torrent pieces.
Declaration
public Task<IReadOnlyList<TorrentPieceState>> GetTorrentPiecesStatesAsync(string hash, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The torrent hash. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<TorrentPieceState>> |
GetTorrentPropertiesAsync(String, CancellationToken)
Gets the torrent generic properties.
Declaration
public Task<TorrentProperties> GetTorrentPropertiesAsync(string hash, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The torrent hash. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TorrentProperties> |
GetTorrentTrackersAsync(String, CancellationToken)
Gets the torrent trackers.
Declaration
public Task<IReadOnlyList<TorrentTracker>> GetTorrentTrackersAsync(string hash, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The torrent hash. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<TorrentTracker>> |
GetTorrentUploadLimitAsync(IEnumerable<String>, CancellationToken)
Gets the torrent upload speed limit.
Declaration
public Task<IReadOnlyDictionary<string, long?>> GetTorrentUploadLimitAsync(IEnumerable<string> hashes, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<System.String, System.Nullable<System.Int64>>> |
GetTorrentWebSeedsAsync(String, CancellationToken)
Gets the torrent web seeds.
Declaration
public Task<IReadOnlyList<Uri>> GetTorrentWebSeedsAsync(string hash, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The torrent hash. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<System.Uri>> |
InstallSearchPluginsAsync(IEnumerable<Uri>, CancellationToken)
Installs the search plugins.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
public Task InstallSearchPluginsAsync(IEnumerable<Uri> sources, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Uri> | sources | URLs of the plugins to install. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
Plugins can be installed from the local file system using file:///
URIs as sources
.
LoginAsync(String, String, CancellationToken)
Authenticates this client with the remote qBittorrent server.
Declaration
public Task LoginAsync(string username, string password, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | username | The username. |
System.String | password | The password. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
LogoutAsync(CancellationToken)
Clears authentication on the remote qBittorrent server.
Declaration
public Task LogoutAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
MarkRssItemAsReadAsync(String, String, CancellationToken)
Marks the RSS article as read, if articleId
is not null.
Otherwise marks the whole RSS feed as read.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.5.1")]
public Task MarkRssItemAsReadAsync(string itemPath, string articleId = null, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | itemPath | Full path of the item. |
System.String | articleId | ID of the article. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
MoveRssItemAsync(String, String, CancellationToken)
Moves or renames the RSS folder or feed.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.0")]
public Task MoveRssItemAsync(string path, string newPath, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The current full path of the folder or feed. |
System.String | newPath | The new path. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
PauseAllAsync(CancellationToken)
Pauses all torrents.
Declaration
[Obsolete("Use PauseAsync(CancellationToken) method instead.")]
public Task PauseAllAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
This method is obsolete. Use PauseAsync(CancellationToken) method instead.
PauseAsync(IEnumerable<String>, CancellationToken)
Pauses the torrents.
Declaration
public Task PauseAsync(IEnumerable<string> hashes, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
PauseAsync(String, CancellationToken)
Pauses the torrent.
Declaration
public Task PauseAsync(string hash, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The torrent hash. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
PauseAsync(CancellationToken)
Pauses all torrents.
Declaration
public async Task PauseAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
This method supersedes PauseAllAsync(CancellationToken).
ReannounceAsync(IEnumerable<String>, CancellationToken)
Reannounces the torrents.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.0.2")]
public Task ReannounceAsync(IEnumerable<string> hashes, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Threading.CancellationToken | token | The token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ReannounceAsync(CancellationToken)
Reannounces all torrents.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.0.2")]
public Task ReannounceAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
RecheckAsync(IEnumerable<String>, CancellationToken)
Rechecks the torrents.
Declaration
public Task RecheckAsync(IEnumerable<string> hashes, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
RecheckAsync(String, CancellationToken)
Rechecks the torrent.
Declaration
public Task RecheckAsync(string hash, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The torrent hash. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
RecheckAsync(CancellationToken)
Rechecks all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
public Task RecheckAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
RenameAsync(String, String, CancellationToken)
Renames the torrent.
Declaration
public Task RenameAsync(string hash, string newName, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The torrent hash. |
System.String | newName | The new name. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
RenameFileAsync(String, Int32, String, CancellationToken)
Renames the file in the torrent.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.4.0")]
[Deprecated("2.8.0")]
public Task RenameFileAsync(string hash, int fileId, string newName, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The hash of the torrent. |
System.Int32 | fileId | The ID of the file to rename. |
System.String | newName | he new name to use for the file. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
This overload is not supported starting from API v2.8.0. Use RenameFileAsync(String, String, String, CancellationToken) instead.
RenameFileAsync(String, String, String, CancellationToken)
Renames the folder of the torrent.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.8.0")]
public Task RenameFileAsync(string hash, string oldPath, string newPath, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The hash of the torrent. |
System.String | oldPath | The old path of the file. |
System.String | newPath | The new path to use for the file. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
This overload is not supported starting until API v2.8.0. Use RenameFileAsync(String, Int32, String, CancellationToken) for earlier API versions instead.
RenameFolderAsync(String, String, String, CancellationToken)
Renames the folder of the torrent.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.8.0")]
public Task RenameFolderAsync(string hash, string oldPath, string newPath, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The hash of the torrent. |
System.String | oldPath | The old path of the folder. |
System.String | newPath | The new path to use for the folder. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
RenameRssAutoDownloadingRuleAsync(String, String, CancellationToken)
Renames the RSS auto-downloading rule.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.0")]
public Task RenameRssAutoDownloadingRuleAsync(string name, string newName, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The rule name. |
System.String | newName | The new rule name. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ResumeAllAsync(CancellationToken)
Resumes all torrents.
Declaration
[Obsolete("Use ResumeAsync(CancellationToken) method instead.")]
public Task ResumeAllAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
This method is obsolete. Use ResumeAsync(CancellationToken) method instead.
ResumeAsync(IEnumerable<String>, CancellationToken)
Resumes the torrents.
Declaration
public Task ResumeAsync(IEnumerable<string> hashes, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ResumeAsync(String, CancellationToken)
Resumes the torrent.
Declaration
public Task ResumeAsync(string hash, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The torrent hash. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ResumeAsync(CancellationToken)
Resumes all torrents.
Declaration
public async Task ResumeAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
This method supersedes ResumeAllAsync(CancellationToken).
SetAutomaticTorrentManagementAsync(Boolean, CancellationToken)
Sets the automatic torrent management for all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
public Task SetAutomaticTorrentManagementAsync(bool enabled, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | enabled | |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetAutomaticTorrentManagementAsync(IEnumerable<String>, Boolean, CancellationToken)
Sets the automatic torrent management.
Declaration
public Task SetAutomaticTorrentManagementAsync(IEnumerable<string> hashes, bool enabled, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Boolean | enabled | |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetFilePriorityAsync(String, IEnumerable<Int32>, TorrentContentPriority, CancellationToken)
Sets the file priority for multiple files.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.2.0")]
public Task SetFilePriorityAsync(string hash, IEnumerable<int> fileIds, TorrentContentPriority priority, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The torrent hash. |
System.Collections.Generic.IEnumerable<System.Int32> | fileIds | The file identifiers. |
TorrentContentPriority | priority | The priority. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetFilePriorityAsync(String, Int32, TorrentContentPriority, CancellationToken)
Sets the file priority.
Declaration
public Task SetFilePriorityAsync(string hash, int fileId, TorrentContentPriority priority, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The torrent hash. |
System.Int32 | fileId | The file identifier. |
TorrentContentPriority | priority | The priority. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetForceStartAsync(Boolean, CancellationToken)
Sets the force start for all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
public Task SetForceStartAsync(bool enabled, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | enabled | |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetForceStartAsync(IEnumerable<String>, Boolean, CancellationToken)
Sets the force start.
Declaration
public Task SetForceStartAsync(IEnumerable<string> hashes, bool enabled, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Boolean | enabled | |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetGlobalDownloadLimitAsync(Int64, CancellationToken)
Sets the global download speed limit.
Declaration
public Task SetGlobalDownloadLimitAsync(long limit, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | limit | The limit. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetGlobalUploadLimitAsync(Int64, CancellationToken)
Sets the global upload speed limit.
Declaration
public Task SetGlobalUploadLimitAsync(long limit, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | limit | The limit. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetLocationAsync(IEnumerable<String>, String, CancellationToken)
Sets the location of the torrents.
Declaration
public Task SetLocationAsync(IEnumerable<string> hashes, string newLocation, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.String | newLocation | The new location. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetLocationAsync(String, CancellationToken)
Sets the location of all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
public Task SetLocationAsync(string newLocation, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | newLocation | The new location. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetPreferencesAsync(Preferences, CancellationToken)
Gets qBittorrent preferences.
Declaration
public async Task SetPreferencesAsync(Preferences preferences, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
Preferences | preferences | The prefences to set. You can set only the properties you want to change and leave the other ones as null. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetRssAutoDownloadingRuleAsync(String, RssAutoDownloadingRule, CancellationToken)
Sets the RSS auto-downloading rule.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.0")]
public Task SetRssAutoDownloadingRuleAsync(string name, RssAutoDownloadingRule rule, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The rule name. |
RssAutoDownloadingRule | rule | The rule definition. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetShareLimitsAsync(IEnumerable<String>, Double, TimeSpan, CancellationToken)
Sets the torrent share limits.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.0.1", MaxVersion = "2.9.1")]
public Task SetShareLimitsAsync(IEnumerable<string> hashes, double ratio, TimeSpan seedingTime, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
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
| Improve this Doc View SourceSetShareLimitsAsync(IEnumerable<String>, Double, TimeSpan, TimeSpan, CancellationToken)
Sets the torrent share limits.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.9.2")]
public Task SetShareLimitsAsync(IEnumerable<string> hashes, double ratio, TimeSpan seedingTime, TimeSpan inactiveSeedingTime, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
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
| Improve this Doc View SourceSetSuperSeedingAsync(Boolean, CancellationToken)
Sets the super seeding for all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
public Task SetSuperSeedingAsync(bool enabled, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | enabled | |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetSuperSeedingAsync(IEnumerable<String>, Boolean, CancellationToken)
Sets the super seeding asynchronous.
Declaration
public Task SetSuperSeedingAsync(IEnumerable<string> hashes, bool enabled, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Boolean | enabled | |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetTorrentCategoryAsync(IEnumerable<String>, String, CancellationToken)
Sets the torrent category.
Declaration
public Task SetTorrentCategoryAsync(IEnumerable<string> hashes, string category, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.String | category | The category. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetTorrentCategoryAsync(String, CancellationToken)
Sets the torrent category for all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
public Task SetTorrentCategoryAsync(string category, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | category | The category. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetTorrentDownloadLimitAsync(IEnumerable<String>, Int64, CancellationToken)
Sets the torrent download speed limit.
Declaration
public Task SetTorrentDownloadLimitAsync(IEnumerable<string> hashes, long limit, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Int64 | limit | The limit. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetTorrentDownloadLimitAsync(Int64, CancellationToken)
Sets the torrent download speed limit for all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
public Task SetTorrentDownloadLimitAsync(long limit, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | limit | The limit. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetTorrentUploadLimitAsync(IEnumerable<String>, Int64, CancellationToken)
Sets the torrent upload speed limit.
Declaration
public Task SetTorrentUploadLimitAsync(IEnumerable<string> hashes, long limit, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Int64 | limit | The limit. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetTorrentUploadLimitAsync(Int64, CancellationToken)
Sets the torrent upload speed limit for all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
public Task SetTorrentUploadLimitAsync(long limit, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | limit | The limit. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ShutdownApplicationAsync(CancellationToken)
Quits qBittorrent.
Declaration
public async Task ShutdownApplicationAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
StartSearchAsync(String, IEnumerable<String>, String, CancellationToken)
Starts torrent search job.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
public Task<int> StartSearchAsync(string pattern, IEnumerable<string> plugins, string category = "all", CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | pattern | Pattern to search for (e.g. "Ubuntu 18.04"). |
System.Collections.Generic.IEnumerable<System.String> | plugins | Plugins 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 |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> | The ID of the search job. |
StopSearchAsync(Int32, CancellationToken)
Stops torrent search job.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
public Task StopSearchAsync(int id, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | The ID of the search job. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ToggleAlternativeSpeedLimitsAsync(CancellationToken)
Toggles the alternative speed limits.
Declaration
public Task ToggleAlternativeSpeedLimitsAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ToggleFirstLastPiecePrioritizedAsync(IEnumerable<String>, CancellationToken)
Toggles the first and last piece priority.
Declaration
public Task ToggleFirstLastPiecePrioritizedAsync(IEnumerable<string> hashes, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ToggleFirstLastPiecePrioritizedAsync(CancellationToken)
Toggles the first and last piece priority for all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
public Task ToggleFirstLastPiecePrioritizedAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ToggleSequentialDownloadAsync(IEnumerable<String>, CancellationToken)
Toggles the sequential download.
Declaration
public Task ToggleSequentialDownloadAsync(IEnumerable<string> hashes, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ToggleSequentialDownloadAsync(CancellationToken)
Toggles the sequential download for all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
public Task ToggleSequentialDownloadAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
UninstallSearchPluginsAsync(IEnumerable<String>, CancellationToken)
Uninstalls the search plugins.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
public Task UninstallSearchPluginsAsync(IEnumerable<string> names, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | names | Names of the plugins to uninstall. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
UpdateSearchPluginsAsync(CancellationToken)
Updates the search plugins.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
public Task UpdateSearchPluginsAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |