A full-featured download manager.
chore(engine): bundle aria2 motrix.17 (#2342)
Dr_rOotbaa49c378e4b
diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.ymlindex 77236354..1f54209d 100644--- a/.github/workflows/flatpak.yml+++ b/.github/workflows/flatpak.yml@@ -341,7 +341,7 @@ jobs:-path "*/native-messaging-hosts/*" \\) -print -quit)"output="$("$aria2c" --version)"- printf "%s\n" "$output" | grep -qF "aria2 version 1.37.0-motrix.16"+ printf "%s\n" "$output" | grep -qF "aria2 version 1.37.0-motrix.17"printf "%s\n" "$output" | grep -qF "Async DNS"printf "%s\n" "$output" | grep -qF "BitTorrent"printf "%s\n" "$output" | grep -qF "HTTPS"diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.mdindex 2ff63560..766d4a97 100644--- a/THIRD_PARTY_NOTICES.md+++ b/THIRD_PARTY_NOTICES.md@@ -102,8 +102,8 @@ must obtain permission or replace the font before distributing the build.Desktop builds bundle an `aria2c` executable pinned by`scripts/engine.lock.json`:-- **Version:** 1.37.0-motrix.16-- **Source:** <https://github.com/motrixapp/aria2/tree/v1.37.0-motrix.16>+- **Version:** 1.37.0-motrix.17+- **Source:** <https://github.com/motrixapp/aria2/tree/v1.37.0-motrix.17>- **License:** GNU General Public License v2.0 or later (`GPL-2.0-or-later`)- **Full license text:** `THIRD_PARTY_LICENSES/aria2-COPYING`- **OpenSSL exception / notice:**diff --git a/THIRD_PARTY_NOTICES.zh-CN.md b/THIRD_PARTY_NOTICES.zh-CN.mdindex 9ffc1513..faef9eab 100644--- a/THIRD_PARTY_NOTICES.zh-CN.md+++ b/THIRD_PARTY_NOTICES.zh-CN.md@@ -87,8 +87,8 @@ Safari 图标是从 macOS 27.0(26A428)自带的 Safari 27.0 中 `Safari.app/桌面版随应用打包 `aria2c` 可执行文件,版本由 `scripts/engine.lock.json` 固定:-- **版本:** 1.37.0-motrix.16-- **对应源码:** <https://github.com/motrixapp/aria2/tree/v1.37.0-motrix.16>+- **版本:** 1.37.0-motrix.17+- **对应源码:** <https://github.com/motrixapp/aria2/tree/v1.37.0-motrix.17>- **许可证:** GNU General Public License v2.0 or later(`GPL-2.0-or-later`)- **完整许可证文本:** `THIRD_PARTY_LICENSES/aria2-COPYING`- **OpenSSL 例外条款 / 声明:**diff --git a/e2e/legacy-bt-activation.spec.ts b/e2e/legacy-bt-activation.spec.tsindex d629f205..c4595aef 100644--- a/e2e/legacy-bt-activation.spec.ts+++ b/e2e/legacy-bt-activation.spec.ts@@ -1,6 +1,6 @@import { cp, mkdir, readFile, writeFile } from 'node:fs/promises'import path from 'node:path'-import type { Page } from '@playwright/test'+import type { ElectronApplication, Page } from '@playwright/test'import { CURRENT_SETTINGS_VERSION } from '../src/core/settings/migrations'import { Commands } from '../src/shared/protocol/commands'import { Queries } from '../src/shared/protocol/queries'@@ -28,6 +28,23 @@ async function invoke(page: Page, channel: string, input?: unknown) {)}+async function mainPage(app: ElectronApplication): Promise<Page> {+ await expect+ .poll(() =>+ app+ .windows()+ .find((page) => page.url().includes('w=main'))+ ?.url()+ )+ .toContain('w=main')+ const page = app+ .windows()+ .find((candidate) => candidate.url().includes('w=main'))+ if (!page) throw new Error('Main window was not created')+ await page.waitForLoadState('domcontentloaded')+ return page+}+test('verifies imported BT files through the desktop UI and preserves them after removal', async ({userDataDir,rpcPort,@@ -83,14 +100,28 @@ test('verifies imported BT files through the desktop UI and preserves them afterextraEnv: { MOTRIX_LEGACY_PROFILE: source },})try {- const invitation = await app.firstWindow()- await invitation.waitForLoadState('domcontentloaded')- await invitation.getByRole('button', { name: 'Choose downloads' }).click()- // Deselect every selectable row, then authorize precisely the old torrent.- for (const box of await invitation.getByRole('checkbox').all())- if ((await box.isEnabled()) && (await box.isChecked()))- await box.uncheck()- await invitation.getByText('Skipped: 1', { exact: true }).click()+ const invitation = await mainPage(app)+ await expect(+ invitation.getByRole('heading', {+ name: 'Where would you like to migrate from?',+ })+ ).toBeVisible()+ await invitation+ .getByRole('button', { name: 'Continue', exact: true })+ .click()+ await expect(invitation.locator('[data-import-group="http"]')).toBeVisible()+ for (const type of ['http', 'bt', 'magnet', 'unknown']) {+ const disclosure = invitation.locator(+ `[data-import-group="${type}"] button[aria-expanded="false"]`+ )+ if (await disclosure.count()) await disclosure.click()+ }+ // Select only the old torrent; group controls can reselect child rows.+ for (const name of ['partial.bin', 'fixture-magnet']) {+ const checkbox = invitation.getByRole('checkbox', { name, exact: true })+ await checkbox.uncheck()+ await expect(checkbox).not.toBeChecked()+ }await app.evaluate(({ dialog }, filename) => {dialog.showOpenDialog = async () => ({canceled: false,@@ -102,10 +133,12 @@ test('verifies imported BT files through the desktop UI and preserves them afterinvitation.getByRole('checkbox', { name: 'fixture-bundle', exact: true })).toBeChecked()await invitation- .getByRole('button', { name: 'Import 1', exact: true })+ .getByRole('button', { name: 'Migrate', exact: true }).click()await expect(- invitation.getByText('Imported 1', { exact: true })+ invitation+ .getByLabel('Migration summary')+ .getByText('1 task', { exact: true })).toBeVisible()await invitation.getByRole('button', { name: 'View downloads' }).click()let main = invitation@@ -163,8 +196,7 @@ test('verifies imported BT files through the desktop UI and preserves them afterrpcPort,extraEnv: { MOTRIX_LEGACY_PROFILE: source },})- main = await app.firstWindow()- await main.waitForLoadState('domcontentloaded')+ main = await mainPage(app)await waitForEngineReady(main)await expect.poll(() => invoke(main, Queries.ListTasks))diff --git a/flatpak/app.motrix.native.yml b/flatpak/app.motrix.native.ymlindex 213f9f1a..2a70b534 100644--- a/flatpak/app.motrix.native.yml+++ b/flatpak/app.motrix.native.yml@@ -101,7 +101,7 @@ modules:set -eoutput="$(src/aria2c --version)"printf '%s\n' "$output"- printf '%s\n' "$output" | grep -qF 'aria2 version 1.37.0-motrix.16'+ printf '%s\n' "$output" | grep -qF 'aria2 version 1.37.0-motrix.17'for feature in \'Async DNS' \'BitTorrent' \@@ -123,8 +123,8 @@ modules:sources:- type: giturl: https://github.com/motrixapp/aria2.git- tag: v1.37.0-motrix.16- commit: e093973f113f0a880f9757a2ad0258cb2356295e+ tag: v1.37.0-motrix.17+ commit: 479425df8fb4057d9d2b0370c36ca70ed776114dx-checker-data:type: gittag-pattern: ^v([\d.]+-motrix\.\d+)$@@ -136,9 +136,9 @@ modules:commands:- |sed -i -E \- 's/AC_INIT\(\[aria2\],\[[^]]+\]/AC_INIT([aria2],[1.37.0-motrix.16]/' \+ 's/AC_INIT\(\[aria2\],\[[^]]+\]/AC_INIT([aria2],[1.37.0-motrix.17]/' \configure.ac- grep -qF 'AC_INIT([aria2],[1.37.0-motrix.16]' configure.ac+ grep -qF 'AC_INIT([aria2],[1.37.0-motrix.17]' configure.ac- type: scriptdest-filename: autogen.shcommands:diff --git a/scripts/engine.lock.json b/scripts/engine.lock.jsonindex 541a0cb2..4a07d25a 100644--- a/scripts/engine.lock.json+++ b/scripts/engine.lock.json@@ -1,50 +1,50 @@{"engine": "aria2","repo": "motrixapp/aria2",- "tag": "v1.37.0-motrix.16",- "version": "1.37.0-motrix.16",+ "tag": "v1.37.0-motrix.17",+ "version": "1.37.0-motrix.17","assets": {"darwin-arm64": {- "file": "aria2c-1.37.0-motrix.16-darwin-arm64.tar.gz",+ "file": "aria2c-1.37.0-motrix.17-darwin-arm64.tar.gz","bin": "aria2c",- "archiveSha256": "bb9e8abf19423e593b4d5962d98ea4a798f94fd2a8431ba214bae5838382dc68",- "binarySha256": "4990d1d119e2c3b42e89b5ca0e7fa062cad00037ea6d7341a6c756da57f0c053"+ "archiveSha256": "27d3b5973f389404c629fb1a16d2d6e0e8679bb5ccac1805acf864e1d6d26afa",+ "binarySha256": "5b7622f0232cb5bd46283c3a7a113af5d63a9507aa2a9f8680ca44564173d023"},"darwin-x64": {- "file": "aria2c-1.37.0-motrix.16-darwin-x64.tar.gz",+ "file": "aria2c-1.37.0-motrix.17-darwin-x64.tar.gz","bin": "aria2c",- "archiveSha256": "c578852e975f94e8d2e163e696a4dfc81dec4457618219c09853d20d233900e0",- "binarySha256": "baffd6543f715494a7ae871e3e2f7ec95792fdeb13f98db7924dcaed874d0cda"+ "archiveSha256": "77c4eeb851484023e76f67860320f610bcb665e15703d2373a954062869d8ccf",+ "binarySha256": "f2190de53434a56940421eb46aeb8e3eff16a87fd107aa2280da00297eb9e8ea"},"win32-x64": {- "file": "aria2c-1.37.0-motrix.16-win32-x64.zip",+ "file": "aria2c-1.37.0-motrix.17-win32-x64.zip","bin": "aria2c.exe",- "archiveSha256": "579f17351e81c9fe3ed11d9700f5983235fc362beaf20f5f02820f7a1bfe49b0",- "binarySha256": "b7edee5c43ff18b9e8b77983033ba7816fa220d810949d81fdb928e8b36d862f"+ "archiveSha256": "809e667a95c0332505bc314f85ff97641c49da7c16c8990b1fcbf9c5e0920021",+ "binarySha256": "193ac31a3a00dd4430f5f8068ac073e5110b67f4d5a5faf41914a2eb4ebb547c"},"win32-ia32": {- "file": "aria2c-1.37.0-motrix.16-win32-ia32.zip",+ "file": "aria2c-1.37.0-motrix.17-win32-ia32.zip","bin": "aria2c.exe",- "archiveSha256": "5fe63ed9f6b5b5271ac719a089a6663171f68466b046e38fa9b393af9d28210b",- "binarySha256": "878c59532df2fa1e5dff04dcde3c70b570396734cf3fd662f16ecd0b77ba8535"+ "archiveSha256": "4557182a35a863de652e66e691d17587746d53b05ff2f1ded207b644a1160fcb",+ "binarySha256": "f94265192b87aab0bdb10cfa96f431d8942a1abee8cd8a5c52bb2be160cc6faa"},"linux-x64": {- "file": "aria2c-1.37.0-motrix.16-linux-x64.tar.gz",+ "file": "aria2c-1.37.0-motrix.17-linux-x64.tar.gz","bin": "aria2c",- "archiveSha256": "bd48c06cbf6bebc32e1b75c2abbdad5c0787800b16266147bd0bf5904ce16e94",- "binarySha256": "69980468779003e058c98ad257330caf5dff6338cb1b714f8a7cd76b9bc4e693"+ "archiveSha256": "7e7d65892da33111d980afac72654512c50875f27241a665c320d5d8447e639b",+ "binarySha256": "eb9635c3ca3ae778a4874d2065869015c6b49d059ccc41cebd2426146c5ebf59"},"linux-arm64": {- "file": "aria2c-1.37.0-motrix.16-linux-arm64.tar.gz",+ "file": "aria2c-1.37.0-motrix.17-linux-arm64.tar.gz","bin": "aria2c",- "archiveSha256": "65511295a68fd3bcb002022c2a09364f46a8da6eb385d6c2c3915c5ea349692f",- "binarySha256": "0edfe1408394c88b5b8c91df9cbcd72886085b7373379c61d75dfdc32dc5cfc3"+ "archiveSha256": "ab1be3f6bc039c73006318c744682dc24a7ece90bb178e0951bf8769385f0aca",+ "binarySha256": "7b0f1f5a897cd944b5c9bbaa87c9353d48960bbc6a16ad3213a3a01421bbffff"},"linux-arm": {- "file": "aria2c-1.37.0-motrix.16-linux-armv7l.tar.gz",+ "file": "aria2c-1.37.0-motrix.17-linux-armv7l.tar.gz","bin": "aria2c",- "archiveSha256": "d25727100c5f7d197079a9ad73f4698614286b9d4cc10de4c26ab8d04f9768de",- "binarySha256": "1db7f580677f6d8beb9ddda7f153853c9606c0abb1babc5471867c82a9c1c357"+ "archiveSha256": "5a48d36a0ed856ef7a95bda098dfddfe6a958090711a0b87e23ab46f22c89085",+ "binarySha256": "470f686c810e77108d09573686b1063da0ef1bfbae8c5cc64d77f4edcca07bd6"}}}diff --git a/scripts/verify-flatpak-packaging.mjs b/scripts/verify-flatpak-packaging.mjsindex ca60487f..376ebcfb 100644--- a/scripts/verify-flatpak-packaging.mjs+++ b/scripts/verify-flatpak-packaging.mjs@@ -18,8 +18,8 @@ export const FLATPAK_BUILDER_TOOLS_COMMIT =// tag resolves to is pinned by hand (and cross-checked against the manifest).export const ARIA2_SOURCE = Object.freeze({url: 'https://github.com/motrixapp/aria2.git',- // v1.37.0-motrix.16 — current Motrix aria2 fork release- commit: 'e093973f113f0a880f9757a2ad0258cb2356295e',+ // v1.37.0-motrix.17 — current Motrix aria2 fork release+ commit: '479425df8fb4057d9d2b0370c36ca70ed776114d',})const PNPM_SOURCE = Object.freeze({diff --git a/src/core/engine/aria2/aria2-legacy-checkpoint.integration.test.ts b/src/core/engine/aria2/aria2-legacy-checkpoint.integration.test.tsindex e7002baf..5704d1ba 100644--- a/src/core/engine/aria2/aria2-legacy-checkpoint.integration.test.ts+++ b/src/core/engine/aria2/aria2-legacy-checkpoint.integration.test.ts@@ -270,7 +270,7 @@ describe.skipIf(!binaryPath)(expect(await readFile(targetPath)).toEqual(Buffer.alloc(completedBytes, 17))- })+ }, 20000)it('rejects a token replay with a different reserved task ID', async () => {const { adapter } = wired!diff --git a/tests/check-third-party-notices.test.ts b/tests/check-third-party-notices.test.tsindex 0d5e5eb9..4bcc559a 100644--- a/tests/check-third-party-notices.test.ts+++ b/tests/check-third-party-notices.test.ts@@ -460,9 +460,9 @@ describe('third-party graph dependency notices', () => {expect(notice).toContain('SFNS-Regular.ttf')expect(notice).toContain('https://developer.apple.com/fonts/')- expect(notice).toContain('1.37.0-motrix.16')+ expect(notice).toContain('1.37.0-motrix.17')expect(notice).toContain(- 'https://github.com/motrixapp/aria2/tree/v1.37.0-motrix.16'+ 'https://github.com/motrixapp/aria2/tree/v1.37.0-motrix.17')expect(notice).toContain('GPL-2.0-or-later')expect(notice).toContain('THIRD_PARTY_LICENSES/aria2-COPYING')diff --git a/tests/generate-third-party-notices.test.ts b/tests/generate-third-party-notices.test.tsindex ef87efdb..b2316485 100644--- a/tests/generate-third-party-notices.test.ts+++ b/tests/generate-third-party-notices.test.ts@@ -171,7 +171,7 @@ describe('third-party notice generator', () => {expect(bundle.packageCount).toBeGreaterThan(100)expect(inventory).toContain('| @xyflow/react | 12.12.0 |')- expect(inventory).toContain('| aria2 | 1.37.0-motrix.16 |')+ expect(inventory).toContain('| aria2 | 1.37.0-motrix.17 |')expect(inventory).toContain('| motrix.filename-template | 1.1.1 |')expect(inventory).toContain('Apple San Francisco tray font')expect(licenses).toContain('GNU GENERAL PUBLIC LICENSE')@@ -282,7 +282,7 @@ describe('third-party notice generator', () => {expect(licenses).toContain('GNU GENERAL PUBLIC LICENSE')}const serverInventory = server.files['THIRD_PARTY_DEPENDENCIES.md']- expect(serverInventory).toContain('| aria2 | 1.37.0-motrix.16 |')+ expect(serverInventory).toContain('| aria2 | 1.37.0-motrix.17 |')expect(serverInventory).toContain('| motrix.filename-template | 1.1.1 |')expect(serverInventory).not.toContain('| Electron |')