2021-12-06 07:55:05 +00:00
|
|
|
package drivers
|
|
|
|
|
|
|
|
import (
|
|
|
|
_ "github.com/Xhofe/alist/drivers/123"
|
2022-01-09 14:44:43 +00:00
|
|
|
_ "github.com/Xhofe/alist/drivers/139"
|
2021-12-06 07:55:05 +00:00
|
|
|
_ "github.com/Xhofe/alist/drivers/189"
|
2022-03-09 12:30:56 +00:00
|
|
|
_ "github.com/Xhofe/alist/drivers/189pc"
|
2021-12-06 07:55:05 +00:00
|
|
|
_ "github.com/Xhofe/alist/drivers/alidrive"
|
2021-12-07 12:16:34 +00:00
|
|
|
_ "github.com/Xhofe/alist/drivers/alist"
|
2022-02-02 09:32:11 +00:00
|
|
|
_ "github.com/Xhofe/alist/drivers/baidu"
|
2021-12-31 06:05:35 +00:00
|
|
|
"github.com/Xhofe/alist/drivers/base"
|
2021-12-16 10:03:58 +00:00
|
|
|
_ "github.com/Xhofe/alist/drivers/ftp"
|
2021-12-06 07:55:05 +00:00
|
|
|
_ "github.com/Xhofe/alist/drivers/google"
|
|
|
|
_ "github.com/Xhofe/alist/drivers/lanzou"
|
2022-01-05 17:14:32 +00:00
|
|
|
_ "github.com/Xhofe/alist/drivers/mediatrack"
|
2021-12-06 07:55:05 +00:00
|
|
|
_ "github.com/Xhofe/alist/drivers/native"
|
|
|
|
_ "github.com/Xhofe/alist/drivers/onedrive"
|
2021-12-16 14:50:23 +00:00
|
|
|
_ "github.com/Xhofe/alist/drivers/pikpak"
|
2022-02-16 12:20:39 +00:00
|
|
|
_ "github.com/Xhofe/alist/drivers/quark"
|
2021-12-30 12:31:36 +00:00
|
|
|
_ "github.com/Xhofe/alist/drivers/s3"
|
2022-04-02 11:28:43 +00:00
|
|
|
_ "github.com/Xhofe/alist/drivers/sftp"
|
2021-12-29 14:07:26 +00:00
|
|
|
_ "github.com/Xhofe/alist/drivers/shandian"
|
2022-01-05 14:03:28 +00:00
|
|
|
_ "github.com/Xhofe/alist/drivers/teambition"
|
2022-03-03 11:33:40 +00:00
|
|
|
_ "github.com/Xhofe/alist/drivers/uss"
|
2021-12-30 13:39:17 +00:00
|
|
|
_ "github.com/Xhofe/alist/drivers/webdav"
|
2022-03-03 07:44:41 +00:00
|
|
|
_ "github.com/Xhofe/alist/drivers/xunlei"
|
2022-02-01 09:15:11 +00:00
|
|
|
_ "github.com/Xhofe/alist/drivers/yandex"
|
2022-04-28 15:25:21 +00:00
|
|
|
_ "github.com/Xhofe/alist/drivers/baiduphoto"
|
2021-12-31 06:05:35 +00:00
|
|
|
log "github.com/sirupsen/logrus"
|
|
|
|
"strings"
|
2021-12-06 07:55:05 +00:00
|
|
|
)
|
2021-12-31 06:05:35 +00:00
|
|
|
|
|
|
|
var NoCors string
|
|
|
|
var NoUpload string
|
|
|
|
|
|
|
|
func GetConfig() {
|
|
|
|
for k, v := range base.GetDriversMap() {
|
|
|
|
if v.Config().NoCors {
|
|
|
|
NoCors += k + ","
|
|
|
|
}
|
|
|
|
if v.Upload(nil, nil) != base.ErrEmptyFile {
|
|
|
|
NoUpload += k + ","
|
|
|
|
}
|
|
|
|
}
|
|
|
|
NoCors = strings.Trim(NoCors, ",")
|
2022-01-01 15:04:33 +00:00
|
|
|
NoUpload += "root"
|
2021-12-31 06:05:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
log.Debug("all init")
|
|
|
|
GetConfig()
|
|
|
|
}
|