wip search requests to other nodes

This commit is contained in:
partisan 2024-08-08 21:59:10 +02:00
parent c594c93559
commit 1baa40b620
7 changed files with 411 additions and 9 deletions

View file

@ -146,6 +146,12 @@ func fetchAndCacheFileResults(query, safe, lang string, page int) []TorrentResul
return results
}
func fetchFileResults(query, safe, lang string, page int) []TorrentResult {
cacheKey := CacheKey{Query: query, Page: page, Safe: safe == "true", Lang: lang, Type: "file"}
results := getFileResultsFromCacheOrFetch(cacheKey, query, safe, lang, page)
return results
}
func removeMagnetLink(magnet string) string {
// Remove the magnet: prefix unconditionally
return strings.TrimPrefix(magnet, "magnet:")