added SOCKS5 proxy support
All checks were successful
Run Integration Tests / test (push) Successful in 33s
All checks were successful
Run Integration Tests / test (push) Successful in 33s
This commit is contained in:
parent
234f1dd3be
commit
614ce8903e
22 changed files with 501 additions and 106 deletions
6
video.go
6
video.go
|
@ -151,7 +151,7 @@ func handleVideoSearch(w http.ResponseWriter, settings UserSettings, query strin
|
|||
start := time.Now()
|
||||
|
||||
var results []VideoResult
|
||||
if config.CrawlerEnabled {
|
||||
if config.MetaSearchEnabled {
|
||||
results = fetchVideoResults(query, settings.SafeSearch, settings.SearchLanguage, page)
|
||||
}
|
||||
|
||||
|
@ -184,12 +184,12 @@ func handleVideoSearch(w http.ResponseWriter, settings UserSettings, query strin
|
|||
|
||||
func fetchVideoResults(query, safe, lang string, page int) []VideoResult {
|
||||
// Check if the crawler is enabled
|
||||
if !config.CrawlerEnabled {
|
||||
if !config.MetaSearchEnabled {
|
||||
printDebug("Crawler is disabled; skipping video search.")
|
||||
return []VideoResult{}
|
||||
}
|
||||
|
||||
// Proceed with Piped API request if CrawlerEnabled
|
||||
// Proceed with Piped API request if MetaSearchEnabled
|
||||
apiResp, err := makeHTMLRequest(query, safe, lang, page)
|
||||
if err != nil {
|
||||
printWarn("Error fetching video results: %v", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue