mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2026-10-10 04:53:09 +08:00
fix(strm): support generate strm with sign (#1832)
This commit is contained in:
@@ -13,6 +13,7 @@ type Addition struct {
|
||||
FilterFileTypes string `json:"filterFileTypes" type:"text" default:"mp4,mkv,flv,avi,wmv,ts,rmvb,webm,mp3,flac,aac,wav,ogg,m4a,wma,alac" required:"false" help:"Supports suffix name of strm file"`
|
||||
EncodePath bool `json:"encodePath" default:"true" required:"true" help:"encode the path in the strm file"`
|
||||
WithoutUrl bool `json:"withoutUrl" default:"false" help:"strm file content without URL prefix"`
|
||||
WithSign bool `json:"withSign" default:"false"`
|
||||
SaveStrmToLocal bool `json:"SaveStrmToLocal" default:"false" help:"save strm file locally"`
|
||||
SaveStrmLocalPath string `json:"SaveStrmLocalPath" type:"text" help:"save strm file local path"`
|
||||
KeepLocalDownloadFile bool `json:"KeepLocalDownloadFile" default:"false" help:"keep local download files"`
|
||||
|
||||
@@ -108,7 +108,7 @@ func (d *Strm) getLink(ctx context.Context, path string) string {
|
||||
if d.EncodePath {
|
||||
finalPath = utils.EncodePath(path, true)
|
||||
}
|
||||
if d.EnableSign {
|
||||
if d.WithSign {
|
||||
signPath := sign.Sign(path)
|
||||
finalPath = fmt.Sprintf("%s?sign=%s", finalPath, signPath)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user