Skip to content

Commit 422142c

Browse files
authored
Merge branch 'OpenListTeam:main' into main
2 parents 42f200a + 84ed487 commit 422142c

File tree

47 files changed

+1029
-130
lines changed

Some content is hidden

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

47 files changed

+1029
-130
lines changed

.github/workflows/beta_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
- name: Setup Go
8888
uses: actions/setup-go@v5
8989
with:
90-
go-version: "1.24.5"
90+
go-version: "1.25.0"
9191

9292
- name: Setup web
9393
run: bash build.sh dev web

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Setup Go
3434
uses: actions/setup-go@v5
3535
with:
36-
go-version: "1.24.5"
36+
go-version: "1.25.0"
3737

3838
- name: Setup web
3939
run: bash build.sh dev web

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- name: Setup Go
4747
uses: actions/setup-go@v5
4848
with:
49-
go-version: '1.24'
49+
go-version: '1.25.0'
5050

5151
- name: Checkout
5252
uses: actions/checkout@v4

.github/workflows/release_docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747

4848
- uses: actions/setup-go@v5
4949
with:
50-
go-version: 'stable'
50+
go-version: '1.25.0'
5151

5252
- name: Cache Musl
5353
id: cache-musl
@@ -87,7 +87,7 @@ jobs:
8787

8888
- uses: actions/setup-go@v5
8989
with:
90-
go-version: 'stable'
90+
go-version: '1.25.0'
9191

9292
- name: Cache Musl
9393
id: cache-musl

.github/workflows/test_docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636

3737
- uses: actions/setup-go@v5
3838
with:
39-
go-version: 'stable'
39+
go-version: '1.25.0'
4040

4141
- name: Cache Musl
4242
id: cache-musl

build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ BuildRelease() {
236236
BuildLoongGLIBC() {
237237
local target_abi="$2"
238238
local output_file="$1"
239-
local oldWorldGoVersion="1.24.3"
239+
local oldWorldGoVersion="1.25.0"
240240

241241
if [ "$target_abi" = "abi1.0" ]; then
242242
echo building for linux-loong64-abi1.0
@@ -254,13 +254,13 @@ BuildLoongGLIBC() {
254254

255255
# Download and setup patched Go compiler for old-world
256256
if ! curl -fsSL --retry 3 -H "Authorization: Bearer $GITHUB_TOKEN" \
257-
"https://github.com/loong64/loong64-abi1.0-toolchains/releases/download/20250722/go${oldWorldGoVersion}.linux-amd64.tar.gz" \
257+
"https://github.com/loong64/loong64-abi1.0-toolchains/releases/download/20250821/go${oldWorldGoVersion}.linux-amd64.tar.gz" \
258258
-o go-loong64-abi1.0.tar.gz; then
259259
echo "Error: Failed to download patched Go compiler for old-world ABI1.0"
260260
if [ -n "$GITHUB_TOKEN" ]; then
261261
echo "Error output from curl:"
262262
curl -fsSL --retry 3 -H "Authorization: Bearer $GITHUB_TOKEN" \
263-
"https://github.com/loong64/loong64-abi1.0-toolchains/releases/download/20250722/go${oldWorldGoVersion}.linux-amd64.tar.gz" \
263+
"https://github.com/loong64/loong64-abi1.0-toolchains/releases/download/20250821/go${oldWorldGoVersion}.linux-amd64.tar.gz" \
264264
-o go-loong64-abi1.0.tar.gz || true
265265
fi
266266
return 1

drivers/115_open/driver.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,27 @@ func (d *Open115) OfflineList(ctx context.Context) (*sdk.OfflineTaskListResp, er
337337
return resp, nil
338338
}
339339

340+
func (d *Open115) GetDetails(ctx context.Context) (*model.StorageDetails, error) {
341+
userInfo, err := d.client.UserInfo(ctx)
342+
if err != nil {
343+
return nil, err
344+
}
345+
total, err := userInfo.RtSpaceInfo.AllTotal.Size.Int64()
346+
if err != nil {
347+
return nil, err
348+
}
349+
free, err := userInfo.RtSpaceInfo.AllRemain.Size.Int64()
350+
if err != nil {
351+
return nil, err
352+
}
353+
return &model.StorageDetails{
354+
DiskUsage: model.DiskUsage{
355+
TotalSpace: uint64(total),
356+
FreeSpace: uint64(free),
357+
},
358+
}, nil
359+
}
360+
340361
// func (d *Open115) GetArchiveMeta(ctx context.Context, obj model.Obj, args model.ArchiveArgs) (model.ArchiveMeta, error) {
341362
// // TODO get archive file meta-info, return errs.NotImplement to use an internal archive tool, optional
342363
// return nil, errs.NotImplement

drivers/123_open/driver.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,5 +214,20 @@ func (d *Open123) Put(ctx context.Context, dstDir model.Obj, file model.FileStre
214214
return nil, fmt.Errorf("upload complete timeout")
215215
}
216216

217+
func (d *Open123) GetDetails(ctx context.Context) (*model.StorageDetails, error) {
218+
userInfo, err := d.getUserInfo()
219+
if err != nil {
220+
return nil, err
221+
}
222+
total := userInfo.Data.SpacePermanent + userInfo.Data.SpaceTemp
223+
free := total - userInfo.Data.SpaceUsed
224+
return &model.StorageDetails{
225+
DiskUsage: model.DiskUsage{
226+
TotalSpace: total,
227+
FreeSpace: free,
228+
},
229+
}, nil
230+
}
231+
217232
var _ driver.Driver = (*Open123)(nil)
218233
var _ driver.PutResult = (*Open123)(nil)

drivers/123_open/types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ type UserInfoResp struct {
133133
// HeadImage string `json:"headImage"`
134134
// Passport string `json:"passport"`
135135
// Mail string `json:"mail"`
136-
// SpaceUsed int64 `json:"spaceUsed"`
137-
// SpacePermanent int64 `json:"spacePermanent"`
138-
// SpaceTemp int64 `json:"spaceTemp"`
136+
SpaceUsed uint64 `json:"spaceUsed"`
137+
SpacePermanent uint64 `json:"spacePermanent"`
138+
SpaceTemp uint64 `json:"spaceTemp"`
139139
// SpaceTempExpr int64 `json:"spaceTempExpr"`
140140
// Vip bool `json:"vip"`
141141
// DirectTraffic int64 `json:"directTraffic"`

drivers/aliyundrive_open/driver.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,21 @@ func (d *AliyundriveOpen) Other(ctx context.Context, args model.OtherArgs) (inte
291291
return resp, nil
292292
}
293293

294+
func (d *AliyundriveOpen) GetDetails(ctx context.Context) (*model.StorageDetails, error) {
295+
res, err := d.request(ctx, limiterOther, "/adrive/v1.0/user/getSpaceInfo", http.MethodPost, nil)
296+
if err != nil {
297+
return nil, err
298+
}
299+
total := utils.Json.Get(res, "personal_space_info", "total_size").ToUint64()
300+
used := utils.Json.Get(res, "personal_space_info", "used_size").ToUint64()
301+
return &model.StorageDetails{
302+
DiskUsage: model.DiskUsage{
303+
TotalSpace: total,
304+
FreeSpace: total - used,
305+
},
306+
}, nil
307+
}
308+
294309
var _ driver.Driver = (*AliyundriveOpen)(nil)
295310
var _ driver.MkdirResult = (*AliyundriveOpen)(nil)
296311
var _ driver.MoveResult = (*AliyundriveOpen)(nil)

0 commit comments

Comments
 (0)