mirror of
https://github.com/zoriya/flood.git
synced 2025-12-06 07:16:18 +00:00
API: torrents: add "isSequential" torrent property
This commit is contained in:
@@ -21,6 +21,8 @@ export const addTorrentByURLSchema = object({
|
||||
isBasePath: boolean().optional(),
|
||||
// Whether destination contains completed contents [default: false]
|
||||
isCompleted: boolean().optional(),
|
||||
// Whether contents of a torrent should be downloaded sequentially [default: false]
|
||||
isSequential: boolean().optional(),
|
||||
// Whether to start torrent [default: false]
|
||||
start: boolean().optional(),
|
||||
});
|
||||
@@ -39,6 +41,8 @@ export const addTorrentByFileSchema = object({
|
||||
isBasePath: boolean().optional(),
|
||||
// Whether destination contains completed contents [default: false]
|
||||
isCompleted: boolean().optional(),
|
||||
// Whether contents of a torrent should be downloaded sequentially [default: false]
|
||||
isSequential: boolean().optional(),
|
||||
// Whether to start torrent [default: false]
|
||||
start: boolean().optional(),
|
||||
});
|
||||
|
||||
@@ -27,6 +27,8 @@ export interface TorrentProperties {
|
||||
eta: number;
|
||||
hash: string;
|
||||
isPrivate: boolean;
|
||||
// If sequential download is enabled
|
||||
isSequential: boolean;
|
||||
message: string;
|
||||
name: string;
|
||||
peersConnected: number;
|
||||
|
||||
@@ -71,6 +71,14 @@ export interface SetTorrentsPriorityOptions {
|
||||
priority: TorrentPriority;
|
||||
}
|
||||
|
||||
// PATCH /api/torrents/sequential
|
||||
export interface SetTorrentsSequentialOptions {
|
||||
// An array of string representing hashes of torrents to operate on
|
||||
hashes: Array<TorrentProperties['hash']>;
|
||||
// If sequential download is enabled
|
||||
isSequential: boolean;
|
||||
}
|
||||
|
||||
// PATCH /api/torrents/trackers
|
||||
export interface SetTorrentsTrackersOptions {
|
||||
// An array of string representing hashes of torrents to operate on
|
||||
|
||||
Reference in New Issue
Block a user