server: support initial seeding (aka superseeding)

https://www.bittorrent.org/beps/bep_0016.html
This commit is contained in:
Jesse Chan
2020-12-26 11:50:16 +08:00
parent fe9cd922eb
commit 26c9987355
11 changed files with 132 additions and 5 deletions
+4
View File
@@ -23,6 +23,8 @@ export const addTorrentByURLSchema = object({
isCompleted: boolean().optional(),
// Whether contents of a torrent should be downloaded sequentially [default: false]
isSequential: boolean().optional(),
// Whether to use initial seeding mode [default: false]
isInitialSeeding: boolean().optional(),
// Whether to start torrent [default: false]
start: boolean().optional(),
});
@@ -43,6 +45,8 @@ export const addTorrentByFileSchema = object({
isCompleted: boolean().optional(),
// Whether contents of a torrent should be downloaded sequentially [default: false]
isSequential: boolean().optional(),
// Whether to use initial seeding mode [default: false]
isInitialSeeding: boolean().optional(),
// Whether to start torrent [default: false]
start: boolean().optional(),
});