added config values to configure enabled meta-search engines

This commit is contained in:
partisan 2025-02-21 19:47:55 +01:00
parent dc4a3a4bec
commit 5e6fc73038
7 changed files with 184 additions and 88 deletions

View file

@ -12,25 +12,16 @@ import (
const retryDuration = 12 * time.Hour // Retry duration for unresponding piped instances
var (
pipedInstances = []string{
"api.piped.yt",
"pipedapi.moomoo.me",
"pipedapi.darkness.services",
"pipedapi.kavin.rocks",
"piped-api.hostux.net",
"pipedapi.syncpundit.io",
"piped-api.cfe.re",
"pipedapi.in.projectsegfau.lt",
"piapi.ggtyler.dev",
"piped-api.codespace.cz",
"pipedapi.coldforge.xyz",
"pipedapi.osphost.fi",
}
pipedInstances = []string{}
disabledInstances = make(map[string]bool)
mu sync.Mutex
videoResultsChan = make(chan []VideoResult) // Channel to receive video results from other nodes
)
func initPipedInstances() {
pipedInstances = config.MetaSearch.Video
}
// VideoAPIResponse matches the structure of the JSON response from the Piped API
type VideoAPIResponse struct {
Items []struct {