We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4a468db commit 4c9020bCopy full SHA for 4c9020b
1 file changed
internal/handler/strm.go
@@ -58,20 +58,11 @@ func alistStrmHandler(content string, alistAddr string) string {
58
logging.Warning("获取 AlistServer 失败:", err)
59
return ""
60
}
61
- data, err := alistServer.FsGet(content)
+ url, err := alistServer.GetFileURL(content, config.AlistStrm.RawURL)
62
if err != nil {
63
- logging.Warning("请求 FsGet 失败:", err)
+ logging.Warning("获取文件 URL 失败:", err)
64
65
66
- var redirectURL string
67
- if config.AlistStrm.RawURL {
68
- redirectURL = data.RawURL
69
- } else {
70
- redirectURL = fmt.Sprintf("%s/d%s", alistAddr, content)
71
- if data.Sign != "" {
72
- redirectURL += "?sign=" + data.Sign
73
- }
74
75
- logging.Infof("AlistStrm 重定向至:%s", redirectURL)
76
- return redirectURL
+ logging.Infof("AlistStrm 重定向至:%s", url)
+ return url
77
0 commit comments