Skip to content

Commit a9f5cef

Browse files
committed
Merge remote-tracking branch 'upstream/main' into pr/TwoOnefour/1152
2 parents 3a82d01 + c1d03c5 commit a9f5cef

File tree

51 files changed

+1600
-273
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1600
-273
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,5 @@ jobs:
7373
with:
7474
files: build/compress/*
7575
prerelease: false
76+
tag_name: ${{ github.event.release.tag_name }}
7677

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ Thank you for your support and understanding of the OpenList project.
7474
- [x] [Thunder](https://pan.xunlei.com)
7575
- [x] [Lanzou](https://www.lanzou.com)
7676
- [x] [ILanzou](https://www.ilanzou.com)
77-
- [x] [Aliyundrive share](https://www.alipan.com)
7877
- [x] [Google photo](https://photos.google.com)
7978
- [x] [Mega.nz](https://mega.nz)
8079
- [x] [Baidu photo](https://photo.baidu.com)
@@ -85,6 +84,16 @@ Thank you for your support and understanding of the OpenList project.
8584
- [x] [FeijiPan](https://www.feijipan.com)
8685
- [x] [dogecloud](https://www.dogecloud.com/product/oss)
8786
- [x] [Azure Blob Storage](https://azure.microsoft.com/products/storage/blobs)
87+
- [x] [Chaoxing](https://www.chaoxing.com)
88+
- [x] [CNB](https://cnb.cool/)
89+
- [x] [Degoo](https://degoo.com)
90+
- [x] [Doubao](https://www.doubao.com)
91+
- [x] [Febbox](https://www.febbox.com)
92+
- [x] [GitHub](https://github.com)
93+
- [x] [OpenList](https://github.com/OpenListTeam/OpenList)
94+
- [x] [Teldrive](https://github.com/tgdrive/teldrive)
95+
- [x] [Weiyun](https://www.weiyun.com)
96+
8897
- [x] Easy to deploy and out-of-the-box
8998
- [x] File preview (PDF, markdown, code, plain text, ...)
9099
- [x] Image preview in gallery mode

README_cn.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ OpenList 是一个由 OpenList 团队独立维护的开源项目,遵循 AGPL-3
7474
- [x] [迅雷网盘](https://pan.xunlei.com)
7575
- [x] [蓝奏云](https://www.lanzou.com)
7676
- [x] [蓝奏云优享版](https://www.ilanzou.com)
77-
- [x] [阿里云盘分享](https://www.alipan.com)
7877
- [x] [Google 相册](https://photos.google.com)
7978
- [x] [Mega.nz](https://mega.nz)
8079
- [x] [百度相册](https://photo.baidu.com)
@@ -85,6 +84,15 @@ OpenList 是一个由 OpenList 团队独立维护的开源项目,遵循 AGPL-3
8584
- [x] [飞机盘](https://www.feijipan.com)
8685
- [x] [多吉云](https://www.dogecloud.com/product/oss)
8786
- [x] [Azure Blob Storage](https://azure.microsoft.com/products/storage/blobs)
87+
- [x] [超星](https://www.chaoxing.com)
88+
- [x] [CNB](https://cnb.cool/)
89+
- [x] [Degoo](https://degoo.com)
90+
- [x] [豆包](https://www.doubao.com)
91+
- [x] [Febbox](https://www.febbox.com)
92+
- [x] [GitHub](https://github.com)
93+
- [x] [OpenList](https://github.com/OpenListTeam/OpenList)
94+
- [x] [Teldrive](https://github.com/tgdrive/teldrive)
95+
- [x] [微云](https://www.weiyun.com)
8896
- [x] 部署方便,开箱即用
8997
- [x] 文件预览(PDF、markdown、代码、纯文本等)
9098
- [x] 画廊模式下的图片预览

README_ja.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ OpenListプロジェクトへのご支援とご理解をありがとうござい
7474
- [x] [Thunder](https://pan.xunlei.com)
7575
- [x] [Lanzou](https://www.lanzou.com)
7676
- [x] [ILanzou](https://www.ilanzou.com)
77-
- [x] [Aliyundrive share](https://www.alipan.com)
7877
- [x] [Google photo](https://photos.google.com)
7978
- [x] [Mega.nz](https://mega.nz)
8079
- [x] [Baidu photo](https://photo.baidu.com)
@@ -85,6 +84,15 @@ OpenListプロジェクトへのご支援とご理解をありがとうござい
8584
- [x] [FeijiPan](https://www.feijipan.com)
8685
- [x] [dogecloud](https://www.dogecloud.com/product/oss)
8786
- [x] [Azure Blob Storage](https://azure.microsoft.com/products/storage/blobs)
87+
- [x] [Chaoxing](https://www.chaoxing.com)
88+
- [x] [CNB](https://cnb.cool/)
89+
- [x] [Degoo](https://degoo.com)
90+
- [x] [Doubao](https://www.doubao.com)
91+
- [x] [Febbox](https://www.febbox.com)
92+
- [x] [GitHub](https://github.com)
93+
- [x] [OpenList](https://github.com/OpenListTeam/OpenList)
94+
- [x] [Teldrive](https://github.com/tgdrive/teldrive)
95+
- [x] [Weiyun](https://www.weiyun.com)
8896
- [x] 簡単にデプロイでき、すぐに使える
8997
- [x] ファイルプレビュー(PDF、markdown、コード、テキストなど)
9098
- [x] ギャラリーモードでの画像プレビュー

README_nl.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ Dank u voor uw ondersteuning en begrip
7474
- [x] [Thunder](https://pan.xunlei.com)
7575
- [x] [Lanzou](https://www.lanzou.com)
7676
- [x] [ILanzou](https://www.ilanzou.com)
77-
- [x] [Aliyundrive share](https://www.alipan.com)
7877
- [x] [Google photo](https://photos.google.com)
7978
- [x] [Mega.nz](https://mega.nz)
8079
- [x] [Baidu photo](https://photo.baidu.com)
@@ -85,6 +84,15 @@ Dank u voor uw ondersteuning en begrip
8584
- [x] [FeijiPan](https://www.feijipan.com)
8685
- [x] [dogecloud](https://www.dogecloud.com/product/oss)
8786
- [x] [Azure Blob Storage](https://azure.microsoft.com/products/storage/blobs)
87+
- [x] [Chaoxing](https://www.chaoxing.com)
88+
- [x] [CNB](https://cnb.cool/)
89+
- [x] [Degoo](https://degoo.com)
90+
- [x] [Doubao](https://www.doubao.com)
91+
- [x] [Febbox](https://www.febbox.com)
92+
- [x] [GitHub](https://github.com)
93+
- [x] [OpenList](https://github.com/OpenListTeam/OpenList)
94+
- [x] [Teldrive](https://github.com/tgdrive/teldrive)
95+
- [x] [Weiyun](https://www.weiyun.com)
8896
- [x] Eenvoudig te implementeren en direct te gebruiken
8997
- [x] Bestandsvoorbeeld (PDF, markdown, code, platte tekst, ...)
9098
- [x] Afbeeldingsvoorbeeld in galerijweergave

drivers/123/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func (f File) CreateTime() time.Time {
2828
}
2929

3030
func (f File) GetHash() utils.HashInfo {
31-
return utils.HashInfo{}
31+
return utils.NewHashInfo(utils.MD5, f.Etag)
3232
}
3333

3434
func (f File) GetPath() string {

drivers/123_open/driver.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
type Open123 struct {
1818
model.Storage
1919
Addition
20+
UID uint64
2021
}
2122

2223
func (d *Open123) Config() driver.Config {
@@ -83,15 +84,15 @@ func (d *Open123) Link(ctx context.Context, file model.Obj, args model.LinkArgs)
8384
}, nil
8485
}
8586

86-
u, err := d.getUserInfo()
87+
uid, err := d.getUID()
8788
if err != nil {
8889
return nil, err
8990
}
9091

9192
duration := time.Duration(d.DirectLinkValidDuration) * time.Minute
9293

9394
newURL, err := d.SignURL(res.Data.URL, d.DirectLinkPrivateKey,
94-
u.Data.UID, duration)
95+
uid, duration)
9596
if err != nil {
9697
return nil, err
9798
}

drivers/123_open/meta.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type Addition struct {
2424
UploadThread int `json:"UploadThread" type:"number" default:"3" help:"the threads of upload"`
2525

2626
// 使用直链
27-
DirectLink bool `json:"DirectLink" type:"boolean" default:"false" required:"false" help:"use direct link when download file"`
27+
DirectLink bool `json:"DirectLink" type:"bool" default:"false" required:"false" help:"use direct link when download file"`
2828
DirectLinkPrivateKey string `json:"DirectLinkPrivateKey" required:"false" help:"private key for direct link, if URL authentication is enabled"`
2929
DirectLinkValidDuration int64 `json:"DirectLinkValidDuration" type:"number" default:"30" required:"false" help:"minutes, if URL authentication is enabled"`
3030

drivers/123_open/types.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -127,19 +127,19 @@ type RefreshTokenResp struct {
127127
type UserInfoResp struct {
128128
BaseResp
129129
Data struct {
130-
UID uint64 `json:"uid"`
131-
Username string `json:"username"`
132-
DisplayName string `json:"displayName"`
133-
HeadImage string `json:"headImage"`
134-
Passport string `json:"passport"`
135-
Mail string `json:"mail"`
136-
SpaceUsed int64 `json:"spaceUsed"`
137-
SpacePermanent int64 `json:"spacePermanent"`
138-
SpaceTemp int64 `json:"spaceTemp"`
139-
SpaceTempExpr string `json:"spaceTempExpr"`
140-
Vip bool `json:"vip"`
141-
DirectTraffic int64 `json:"directTraffic"`
142-
IsHideUID bool `json:"isHideUID"`
130+
UID uint64 `json:"uid"`
131+
// Username string `json:"username"`
132+
// DisplayName string `json:"displayName"`
133+
// HeadImage string `json:"headImage"`
134+
// Passport string `json:"passport"`
135+
// Mail string `json:"mail"`
136+
// SpaceUsed int64 `json:"spaceUsed"`
137+
// SpacePermanent int64 `json:"spacePermanent"`
138+
// SpaceTemp int64 `json:"spaceTemp"`
139+
// SpaceTempExpr int64 `json:"spaceTempExpr"`
140+
// Vip bool `json:"vip"`
141+
// DirectTraffic int64 `json:"directTraffic"`
142+
// IsHideUID bool `json:"isHideUID"`
143143
} `json:"data"`
144144
}
145145

drivers/123_open/util.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,18 @@ func (d *Open123) getUserInfo() (*UserInfoResp, error) {
158158
return &resp, nil
159159
}
160160

161+
func (d *Open123) getUID() (uint64, error) {
162+
if d.UID != 0 {
163+
return d.UID, nil
164+
}
165+
resp, err := d.getUserInfo()
166+
if err != nil {
167+
return 0, err
168+
}
169+
d.UID = resp.Data.UID
170+
return resp.Data.UID, nil
171+
}
172+
161173
func (d *Open123) getFiles(parentFileId int64, limit int, lastFileId int64) (*FileListResp, error) {
162174
var resp FileListResp
163175

@@ -200,7 +212,7 @@ func (d *Open123) getDirectLink(fileId int64) (*DirectLinkResp, error) {
200212

201213
_, err := d.Request(DirectLink, http.MethodGet, func(req *resty.Request) {
202214
req.SetQueryParams(map[string]string{
203-
"fileId": strconv.FormatInt(fileId, 10),
215+
"fileID": strconv.FormatInt(fileId, 10),
204216
})
205217
}, &resp)
206218
if err != nil {

0 commit comments

Comments
 (0)