Skip to content

Commit

Permalink
Added Seed Files
Browse files Browse the repository at this point in the history
  • Loading branch information
LostBeard committed Apr 4, 2024
1 parent f1d6667 commit 310cedb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion SpawnDev.BlazorJS.WebTorrents.Demo/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//DownloadLimit = 50000,
}, webTorrentService =>
{
//webTorrentService.Verbose = true;
webTorrentService.Verbose = true;
});
builder.Services.AddSingleton<MimeTypeService>();
builder.Services.AddSingleton<FetchStatsService>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
var confirmation = await DialogService.Confirm($"Delete {selectedTorrentInfo.Torrent.Name}?");
if (confirmation == true)
{
await selectedTorrentInfo.Torrent.DestroyAsync(new DestroyTorrentOptions{ DestroyStore = true });
selectedTorrentInfo.Torrent.Destroy(new DestroyTorrentOptions{ DestroyStore = true });
}
} catch { }
} },
Expand Down
14 changes: 7 additions & 7 deletions SpawnDev.BlazorJS.WebTorrents/WebTorrentService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,13 @@ void Torrent_OnNoPeers(Torrent torrent, string announceType)
void Torrent_OnReady(Torrent torrent)
{
if (Verbose) JS.Log("Torrent_OnReady", torrent);
//using var discovery = torrent.Discovery;
//discovery.OnPeer += Discovery_OnPeer;
//torrent.Once("close", () =>
//{
// using var discovery = torrent.Discovery;
// discovery.OnPeer += Discovery_OnPeer;
//});
using var discovery = torrent.Discovery;
discovery.OnPeer += Discovery_OnPeer;
torrent.Once("close", () =>
{
using var discovery = torrent.Discovery;
discovery.OnPeer += Discovery_OnPeer;
});
}
void Torrent_OnError(Torrent torrent, JSObject? error)
{
Expand Down

0 comments on commit 310cedb

Please sign in to comment.