From d6bb7478f3e825a493db09795e9e71d2198684ac Mon Sep 17 00:00:00 2001 From: Jeffrey Serio <23226432+hyperreal64@users.noreply.github.com> Date: Mon, 24 Jul 2023 20:43:53 -0500 Subject: [PATCH] Filter "rc" from torrent filename string --- qubes/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubes/main.go b/qubes/main.go index 0c49b41..478308f 100644 --- a/qubes/main.go +++ b/qubes/main.go @@ -33,7 +33,7 @@ func (q Qubes) AddNewTorrents(transmissionbt *transmissionrpc.Client) error { // Extract torrent URLs from web page contents var torrentURLs []string doc.Find("a").Each(func(i int, s *goquery.Selection) { - if strings.Contains(s.Text(), q.Relver) && strings.Contains(s.Text(), "torrent") { + if strings.Contains(s.Text(), q.Relver) && strings.Contains(s.Text(), "torrent") && !strings.Contains(s.Text(), "rc") { torrentURLs = append(torrentURLs, fmt.Sprintf("%s/%s", q.URL, s.Text())) } })