feat(task): replace built-in task adaptors with a sandboxed JS plugin system (#7076)

This commit is contained in:
Calcium-Ion
2026-08-29 18:51:57 +08:00
committed by GitHub
parent 7037ac15bd
commit eb48396d5f
336 changed files with 52333 additions and 6369 deletions
+10
View File
@@ -58,6 +58,7 @@ const (
ChannelTypeAdvancedCustom = 58
ChannelTypeSub2API = 59
ChannelTypeNewAPI = 60
ChannelTypeTaskPlugin = 61
ChannelTypeDummy // this one is only for count, do not add any channel after this
)
@@ -124,6 +125,14 @@ var ChannelBaseURLs = []string{
"", //58
"", //59
"", //60
"", //61
}
func GetChannelBaseURL(channelType int) string {
if channelType < 0 || channelType >= len(ChannelBaseURLs) {
return ""
}
return ChannelBaseURLs[channelType]
}
var ChannelTypeNames = map[int]string{
@@ -184,6 +193,7 @@ var ChannelTypeNames = map[int]string{
ChannelTypeAdvancedCustom: "Advanced Custom",
ChannelTypeSub2API: "Sub2API",
ChannelTypeNewAPI: "New API",
ChannelTypeTaskPlugin: "Task Plugin",
}
func GetChannelTypeName(channelType int) string {