refactor: pass api_url through context (#457)

* refactor: pass `api_url` through context

* 移除 LinkArgs.HttpReq

* pref(alias): 减少不必要下载代理

* 修复bug

* net: 支持1并发 分片下载
This commit is contained in:
j2rong4cn
2025-06-30 15:48:05 +08:00
committed by GitHub
parent f0236522f3
commit 103abc942e
30 changed files with 209 additions and 222 deletions

View File

@ -1,8 +1,6 @@
package common
import (
"context"
"net/http"
"strings"
"github.com/OpenListTeam/OpenList/cmd/flags"
@ -90,10 +88,3 @@ func Pluralize(count int, singular, plural string) string {
}
return plural
}
func GetHttpReq(ctx context.Context) *http.Request {
if c, ok := ctx.(*gin.Context); ok {
return c.Request
}
return nil
}