From 0bb33a871980215b2a36769e64d3d01ad0472f69 Mon Sep 17 00:00:00 2001 From: wmymz Date: Sat, 22 Jun 2024 16:57:47 +0800 Subject: [PATCH 01/10] =?UTF-8?q?MOD:=20=E9=98=BF=E9=87=8C=E4=BA=91?= =?UTF-8?q?=E7=9B=98=E6=96=87=E4=BB=B6=E4=B8=8B=E8=BD=BD=E4=BC=98=E5=85=88?= =?UTF-8?q?=E5=B0=9D=E8=AF=95=E6=8F=90=E5=8F=96cdn=E7=9B=B4=E9=93=BE?= =?UTF-8?q?=EF=BC=8C=E5=A6=82=E6=9E=9C=E6=8B=BF=E4=B8=8D=E5=88=B0=E5=88=99?= =?UTF-8?q?=E9=99=8D=E7=BA=A7=E4=BB=A5=E5=89=8D=E7=9A=84=E6=99=AE=E9=80=9A?= =?UTF-8?q?=E7=9B=B4=E9=93=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- drivers/aliyundrive/driver.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/aliyundrive/driver.go b/drivers/aliyundrive/driver.go index 2a977aa35e5..181339f7bd1 100644 --- a/drivers/aliyundrive/driver.go +++ b/drivers/aliyundrive/driver.go @@ -106,9 +106,18 @@ func (d *AliDrive) Link(ctx context.Context, file model.Obj, args model.LinkArgs "file_id": file.GetID(), "expire_sec": 14400, } - res, err, _ := d.request("https://api.alipan.com/v2/file/get_download_url", http.MethodPost, func(req *resty.Request) { + res, err, _ := d.request("https://bj29.api.aliyunpds.com/v2/file/get_download_url", http.MethodPost, func(req *resty.Request) { req.SetBody(data) }, nil) + // 尝试获取 cdn_url + cdnURL := utils.Json.Get(res, "cdn_url").ToString() + var downloadURL string + if cdnURL != nil && cdnURL != "" { + downloadURL = cdnURL + } else { + // 如果 cdn_url 为空,则获取 url + downloadURL = utils.Json.Get(res, "url").ToString() + } if err != nil { return nil, err } @@ -116,7 +125,7 @@ func (d *AliDrive) Link(ctx context.Context, file model.Obj, args model.LinkArgs Header: http.Header{ "Referer": []string{"https://www.alipan.com/"}, }, - URL: utils.Json.Get(res, "url").ToString(), + URL: downloadURL, }, nil } From 7b4176cf970882a7bf1842ba0eeca79531a73170 Mon Sep 17 00:00:00 2001 From: wmymz Date: Sat, 22 Jun 2024 16:59:33 +0800 Subject: [PATCH 02/10] FIX: bug --- drivers/aliyundrive/driver.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/aliyundrive/driver.go b/drivers/aliyundrive/driver.go index 181339f7bd1..c06d5ed9c23 100644 --- a/drivers/aliyundrive/driver.go +++ b/drivers/aliyundrive/driver.go @@ -109,6 +109,9 @@ func (d *AliDrive) Link(ctx context.Context, file model.Obj, args model.LinkArgs res, err, _ := d.request("https://bj29.api.aliyunpds.com/v2/file/get_download_url", http.MethodPost, func(req *resty.Request) { req.SetBody(data) }, nil) + if err != nil { + return nil, err + } // 尝试获取 cdn_url cdnURL := utils.Json.Get(res, "cdn_url").ToString() var downloadURL string @@ -118,9 +121,6 @@ func (d *AliDrive) Link(ctx context.Context, file model.Obj, args model.LinkArgs // 如果 cdn_url 为空,则获取 url downloadURL = utils.Json.Get(res, "url").ToString() } - if err != nil { - return nil, err - } return &model.Link{ Header: http.Header{ "Referer": []string{"https://www.alipan.com/"}, From fdd4737fbe9dbb1ffe1630eec623d11ab1ae158e Mon Sep 17 00:00:00 2001 From: wmymz Date: Fri, 5 Jul 2024 15:50:34 +0800 Subject: [PATCH 03/10] Update build.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add:手动执行工作流 --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b75010ef8e7..0abda0fe098 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,7 @@ on: branches: [ 'main' ] pull_request: branches: [ 'main' ] + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -45,4 +46,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: alist_${{ env.SHA }} - path: dist \ No newline at end of file + path: dist From 77679d1b94be2f49f36ed480f490a0dfb01bc3d8 Mon Sep 17 00:00:00 2001 From: wmymz Date: Fri, 5 Jul 2024 15:57:01 +0800 Subject: [PATCH 04/10] Update driver.go --- drivers/aliyundrive/driver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/aliyundrive/driver.go b/drivers/aliyundrive/driver.go index c06d5ed9c23..c9b390c7952 100644 --- a/drivers/aliyundrive/driver.go +++ b/drivers/aliyundrive/driver.go @@ -115,7 +115,7 @@ func (d *AliDrive) Link(ctx context.Context, file model.Obj, args model.LinkArgs // 尝试获取 cdn_url cdnURL := utils.Json.Get(res, "cdn_url").ToString() var downloadURL string - if cdnURL != nil && cdnURL != "" { + if cdnURL != "" { downloadURL = cdnURL } else { // 如果 cdn_url 为空,则获取 url From 0f20de2ec492db177952ec04a92b1390a79bfc29 Mon Sep 17 00:00:00 2001 From: wmymz Date: Fri, 5 Jul 2024 16:57:07 +0800 Subject: [PATCH 05/10] Update build_docker.yml --- .github/workflows/build_docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml index 731b0159011..68a2d7d956c 100644 --- a/.github/workflows/build_docker.yml +++ b/.github/workflows/build_docker.yml @@ -60,7 +60,7 @@ jobs: if: github.event_name == 'push' uses: docker/login-action@v3 with: - username: xhofe + username: wmymz password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push From b7fadfdd276404ac146e2185eab7d6ed6082abb8 Mon Sep 17 00:00:00 2001 From: wmymz Date: Fri, 5 Jul 2024 17:17:54 +0800 Subject: [PATCH 06/10] Update build_docker.yml --- .github/workflows/build_docker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml index 68a2d7d956c..3e88c492ed3 100644 --- a/.github/workflows/build_docker.yml +++ b/.github/workflows/build_docker.yml @@ -22,13 +22,13 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: xhofe/alist + images: wmymz/alist - name: Docker meta with ffmpeg id: meta-ffmpeg uses: docker/metadata-action@v5 with: - images: xhofe/alist + images: wmymz/alist flavor: | suffix=-ffmpeg,onlatest=true From 3b933c1490368245972cc2aa408d99d13c98b910 Mon Sep 17 00:00:00 2001 From: wmymz Date: Fri, 5 Jul 2024 17:47:28 +0800 Subject: [PATCH 07/10] Update build_docker.yml --- .github/workflows/build_docker.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml index 3e88c492ed3..cdd86034636 100644 --- a/.github/workflows/build_docker.yml +++ b/.github/workflows/build_docker.yml @@ -2,9 +2,9 @@ name: build_docker on: push: - branches: [ main ] + 分支: [ main ] pull_request: - branches: [ main ] + 分支: [ main ] concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -98,7 +98,7 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 with: - repository: alist-org/with_aria2 + repository: qy527145/with_aria2 ref: main persist-credentials: false fetch-depth: 0 @@ -114,4 +114,4 @@ jobs: with: github_token: ${{ secrets.MY_TOKEN }} branch: main - repository: alist-org/with_aria2 + repository: qy527145/with_aria2 From 196c9244f91685d31fb6a5e3ab64c21a683abfdf Mon Sep 17 00:00:00 2001 From: wmymz Date: Fri, 5 Jul 2024 18:05:30 +0800 Subject: [PATCH 08/10] Update release.yml --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d43d39d0c3b..1f920f814b1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,7 +55,7 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 with: - repository: alist-org/desktop-release + repository: qy527145/desktop-release ref: main persist-credentials: false fetch-depth: 0 @@ -72,4 +72,4 @@ jobs: with: github_token: ${{ secrets.MY_TOKEN }} branch: main - repository: alist-org/desktop-release \ No newline at end of file + repository: qy527145/desktop-release From e85a578b8e7aea2ccf5cc14554d41147c9450ce6 Mon Sep 17 00:00:00 2001 From: wmymz Date: Fri, 5 Jul 2024 18:11:19 +0800 Subject: [PATCH 09/10] Fix: action build --- .github/workflows/release_docker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release_docker.yml b/.github/workflows/release_docker.yml index 8bff6a3d9b3..31a46646992 100644 --- a/.github/workflows/release_docker.yml +++ b/.github/workflows/release_docker.yml @@ -88,7 +88,7 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 with: - repository: alist-org/with_aria2 + repository: qy527145/with_aria2 ref: main persist-credentials: false fetch-depth: 0 @@ -104,4 +104,4 @@ jobs: with: github_token: ${{ secrets.MY_TOKEN }} branch: main - repository: alist-org/with_aria2 + repository: qy527145/with_aria2 From 78969c0424d40b1ecfe2c3d7daf4473260c15299 Mon Sep 17 00:00:00 2001 From: wmymz Date: Sat, 13 Jul 2024 20:59:19 +0800 Subject: [PATCH 10/10] Update auto_lang.yml --- .github/workflows/auto_lang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto_lang.yml b/.github/workflows/auto_lang.yml index 9108dd1bf2b..f1c85dba3dc 100644 --- a/.github/workflows/auto_lang.yml +++ b/.github/workflows/auto_lang.yml @@ -37,7 +37,7 @@ jobs: - name: Checkout alist-web uses: actions/checkout@v4 with: - repository: 'alist-org/alist-web' + repository: 'qy527145/alist-web' ref: main persist-credentials: false fetch-depth: 0