Skip to content

Commit

Permalink
format go files
Browse files Browse the repository at this point in the history
  • Loading branch information
sweetbbak committed Mar 12, 2024
1 parent 8b33e1c commit b569bf4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 0 additions & 4 deletions cmd/toru/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions cmd/toru/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,20 @@ 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")
}
if episode > torrentFiles {
return "", errors.New("episode doesn't exist")
}
}

link := cl.ServeTorrent(t, episode)

// consider deleting this as it sometimes conflicts with the fzf user interface
Expand Down

0 comments on commit b569bf4

Please sign in to comment.