From b569bf464fd487a41b48c7459fe4296ebf6137d7 Mon Sep 17 00:00:00 2001 From: Meili C Date: Tue, 12 Mar 2024 12:14:19 -0800 Subject: [PATCH] format go files --- cmd/toru/search.go | 4 ---- cmd/toru/stream.go | 7 +++---- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/cmd/toru/search.go b/cmd/toru/search.go index 52fb3f5..a8f1468 100644 --- a/cmd/toru/search.go +++ b/cmd/toru/search.go @@ -22,10 +22,6 @@ func runSearch(cl *libtorrent.Client) error { return nil } - // if searchopts.Interactive { - // return InteractiveSearch(cl) - // } - // build the query if searchopts.Category != "" { s.Category = searchopts.Category diff --git a/cmd/toru/stream.go b/cmd/toru/stream.go index 34cc395..c635f97 100644 --- a/cmd/toru/stream.go +++ b/cmd/toru/stream.go @@ -59,13 +59,12 @@ func StreamTorrent(torfile string, cl *libtorrent.Client) (string, error) { } success.Success("Success!") - torrentFiles := len(t.Files()) - var episode int + var episode int if torrentFiles != 1 { ep, _ := Prompt("Choose an episode") - episode, err = strconv.Atoi(ep) + episode, err = strconv.Atoi(ep) if err != nil { return "", errors.New("episode must be numeric") } @@ -73,7 +72,7 @@ func StreamTorrent(torfile string, cl *libtorrent.Client) (string, error) { return "", errors.New("episode doesn't exist") } } - + link := cl.ServeTorrent(t, episode) // consider deleting this as it sometimes conflicts with the fzf user interface