refactor: rewrite qbit downlaoder

This commit is contained in:
2025-04-03 02:22:26 +08:00
parent 234441e6a3
commit 27b52f7fd1
76 changed files with 1501 additions and 955 deletions

View File

@@ -84,7 +84,7 @@ async function generateMockFile(filePath: string, size: number) {
await fsp.truncate(filePath, size);
}
// Generate torrent file
// Generate bittorrent file
function generateTorrent(folderPath: string, torrentPath: string) {
return new Promise<void>((resolve, reject) => {
createTorrent(
@@ -113,7 +113,7 @@ function generateTorrent(folderPath: string, torrentPath: string) {
});
}
// Add torrent and seed
// Add bittorrent and seed
async function seedTorrent(torrentPath: string): Promise<Torrent> {
return new Promise((resolve) => {
const torrent = webTorrent.seed(