removed debugging statements for torrents
All checks were successful
Run Integration Tests / test (push) Successful in 18s

This commit is contained in:
partisan 2024-12-05 00:50:56 +01:00
parent 491df4e419
commit b6c37452ca
3 changed files with 3 additions and 6 deletions

View file

@ -94,9 +94,6 @@ func (tg *TorrentGalaxy) Search(query string, category string) ([]TorrentResult,
title := strings.TrimSpace(titleDiv.Text()) title := strings.TrimSpace(titleDiv.Text())
magnetLink, exists := s.Find("a[href^='magnet']").Attr("href") magnetLink, exists := s.Find("a[href^='magnet']").Attr("href")
fmt.Printf("Found title: %s\n", title) // Debugging statement
fmt.Printf("Found magnet link: %s\n", magnetLink) // Debugging statement
if !exists { if !exists {
log.Printf("No magnet link found for title: %s", title) log.Printf("No magnet link found for title: %s", title)
return return

View file

@ -135,7 +135,7 @@ func fetchFileResults(query, safe, lang string, page int) []TorrentResult {
continue continue
} }
for _, r := range res { for _, r := range res {
r.Magnet = removeMagnetLink(r.Magnet) // Remove "magnet:", prehaps useless now? r.Magnet = removeMagnetLink(r.Magnet) // Remove "magnet:", perhaps useless now?
results = append(results, r) results = append(results, r)
} }
} }

View file

@ -62,10 +62,10 @@ func getTextResultsFromCacheOrFetch(cacheKey CacheKey, query, safe, lang string,
go func() { go func() {
results, exists := resultsCache.Get(cacheKey) results, exists := resultsCache.Get(cacheKey)
if exists { if exists {
printInfo("Cache hit") printDebug("Cache hit")
cacheChan <- results cacheChan <- results
} else { } else {
printInfo("Cache miss") printDebug("Cache miss")
cacheChan <- nil cacheChan <- nil
} }
}() }()