Skip to content

Commit ff3c4b8

Browse files
authored
fix(strm): support generate strm with sign (#1832)
1 parent f86c7c8 commit ff3c4b8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

drivers/strm/meta.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ type Addition struct {
1313
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"`
1414
EncodePath bool `json:"encodePath" default:"true" required:"true" help:"encode the path in the strm file"`
1515
WithoutUrl bool `json:"withoutUrl" default:"false" help:"strm file content without URL prefix"`
16+
WithSign bool `json:"withSign" default:"false"`
1617
SaveStrmToLocal bool `json:"SaveStrmToLocal" default:"false" help:"save strm file locally"`
1718
SaveStrmLocalPath string `json:"SaveStrmLocalPath" type:"text" help:"save strm file local path"`
1819
KeepLocalDownloadFile bool `json:"KeepLocalDownloadFile" default:"false" help:"keep local download files"`

drivers/strm/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func (d *Strm) getLink(ctx context.Context, path string) string {
108108
if d.EncodePath {
109109
finalPath = utils.EncodePath(path, true)
110110
}
111-
if d.EnableSign {
111+
if d.WithSign {
112112
signPath := sign.Sign(path)
113113
finalPath = fmt.Sprintf("%s?sign=%s", finalPath, signPath)
114114
}

0 commit comments

Comments
 (0)