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 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b059a20b0d9..4c75e675924 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 diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml index cfd045117e1..69ba83cf571 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 }} @@ -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 @@ -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 @@ -95,7 +95,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 @@ -111,4 +111,4 @@ jobs: with: github_token: ${{ secrets.MY_TOKEN }} branch: main - repository: alist-org/with_aria2 + repository: qy527145/with_aria2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6ef38566143..1269526d508 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 diff --git a/.github/workflows/release_docker.yml b/.github/workflows/release_docker.yml index 95a686b2fce..760d345dea4 100644 --- a/.github/workflows/release_docker.yml +++ b/.github/workflows/release_docker.yml @@ -89,7 +89,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 @@ -105,4 +105,4 @@ jobs: with: github_token: ${{ secrets.MY_TOKEN }} branch: main - repository: alist-org/with_aria2 + repository: qy527145/with_aria2 diff --git a/drivers/aliyundrive/driver.go b/drivers/aliyundrive/driver.go index 2a977aa35e5..c9b390c7952 100644 --- a/drivers/aliyundrive/driver.go +++ b/drivers/aliyundrive/driver.go @@ -106,17 +106,26 @@ 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) if err != nil { return nil, err } + // 尝试获取 cdn_url + cdnURL := utils.Json.Get(res, "cdn_url").ToString() + var downloadURL string + if cdnURL != "" { + downloadURL = cdnURL + } else { + // 如果 cdn_url 为空,则获取 url + downloadURL = utils.Json.Get(res, "url").ToString() + } return &model.Link{ Header: http.Header{ "Referer": []string{"https://www.alipan.com/"}, }, - URL: utils.Json.Get(res, "url").ToString(), + URL: downloadURL, }, nil }