2025-07-01 14:29:28 +08:00
|
|
|
package strm
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/OpenListTeam/OpenList/v4/internal/driver"
|
|
|
|
"github.com/OpenListTeam/OpenList/v4/internal/op"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Addition struct {
|
|
|
|
Paths string `json:"paths" required:"true" type:"text"`
|
|
|
|
SiteUrl string `json:"siteUrl" type:"text" required:"false" help:"The prefix URL of the strm file"`
|
|
|
|
FilterFileTypes string `json:"filterFileTypes" type:"text" default:"strm" required:"false" help:"Supports suffix name of strm file"`
|
2025-07-02 21:09:57 +08:00
|
|
|
EncodePath bool `json:"encodePath" default:"true" required:"true" help:"encode the path in the strm file"`
|
2025-07-01 14:29:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
var config = driver.Config{
|
2025-07-12 17:57:54 +08:00
|
|
|
Name: "Strm",
|
|
|
|
LocalSort: true,
|
|
|
|
NoCache: true,
|
|
|
|
NoUpload: true,
|
|
|
|
DefaultRoot: "/",
|
|
|
|
OnlyLinkMFile: true,
|
|
|
|
OnlyProxy: true,
|
|
|
|
NoLinkURL: true,
|
2025-07-01 14:29:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
op.RegisterDriver(func() driver.Driver {
|
2025-07-02 21:09:57 +08:00
|
|
|
return &Strm{
|
|
|
|
Addition: Addition{
|
|
|
|
EncodePath: true,
|
|
|
|
},
|
|
|
|
}
|
2025-07-01 14:29:28 +08:00
|
|
|
})
|
|
|
|
}
|