Add reading torrent list from file cache, add ffprobe check, bring back proxy in config
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
netHttp "net/http"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -52,7 +53,13 @@ func MainApp(configPath string) {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
proxyURL := os.Getenv("PROXY")
|
||||
var proxyURL string
|
||||
if config.GetProxy() != "" {
|
||||
proxyURL = config.GetProxy()
|
||||
zurglog.Infof("Using proxy: %s", proxyURL)
|
||||
} else {
|
||||
proxyURL = os.Getenv("PROXY")
|
||||
}
|
||||
|
||||
repoClient4 := http.NewHTTPClient("", 0, 1, false, []string{}, proxyURL, log.Named("network_test"))
|
||||
repoClient6 := http.NewHTTPClient("", 0, 1, true, []string{}, proxyURL, log.Named("network_test"))
|
||||
@@ -135,6 +142,11 @@ func MainApp(configPath string) {
|
||||
log.Named("router"),
|
||||
)
|
||||
|
||||
_, err = exec.LookPath("ffprobe")
|
||||
if err != nil {
|
||||
zurglog.Warn("ffprobe not found in PATH (do you have ffmpeg installed?), you won't be able to perform media analysis")
|
||||
}
|
||||
|
||||
//// pprof
|
||||
// workerPool.Submit(func() {
|
||||
// if err := netHttp.ListenAndServe(":6060", nil); err != nil && err != netHttp.ErrServerClosed {
|
||||
|
||||
Reference in New Issue
Block a user