From 62911fd65632ccca521ed9108d8ecd27be0780f3 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Wed, 1 Sep 2021 15:26:12 +1000 Subject: [PATCH] cmd/torrent download: Don't seed if no torrents are specified --- cmd/torrent/main.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/torrent/main.go b/cmd/torrent/main.go index 61fd2ab2..a11373f7 100644 --- a/cmd/torrent/main.go +++ b/cmd/torrent/main.go @@ -355,8 +355,12 @@ func downloadErr() error { return xerrors.New("y u no complete torrents?!") } if flags.Seed { - outputStats(client) - <-stop.C() + if len(client.Torrents()) == 0 { + log.Print("no torrents to seed") + } else { + outputStats(client) + <-stop.C() + } } return nil } -- 2.48.1