Filter "rc" from torrent filename string

This commit is contained in:
Jeffrey Serio 2023-07-24 20:43:53 -05:00
parent 4c494b635f
commit d6bb7478f3

View File

@ -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()))
}
})