Skip to content

A full-featured download manager.

chore: upgrade aria2 version to 1.36 (#1411)

Dr_rOot55e2a42f3d12
diff --git a/.electron-vue/build.js b/.electron-vue/build.js
index 37d77a72..ba59a777 100644
--- a/.electron-vue/build.js
+++ b/.electron-vue/build.js
@@ -120,16 +120,20 @@ function greeting () {
const cols = process.stdout.columns
let text = ''
- if (cols > 85) text = 'lets-build'
- else if (cols > 60) text = 'lets-|build'
- else text = false
+ if (cols > 85) {
+ text = 'lets-build'
+ } else if (cols > 60) {
+ text = 'lets-|build'
+ } else {
+ text = false
+ }
if (text && !isCI) {
say(text, {
- colors: ['yellow'],
+ colors: ['magentaBright'],
font: 'simple3d',
space: false
})
- } else console.log(chalk.yellow.bold('\n lets-build'))
+ } else console.log(chalk.magentaBright.bold('\n lets-build'))
console.log()
}
diff --git a/.electron-vue/dev-runner.js b/.electron-vue/dev-runner.js
index 86a957c8..ab1738c8 100644
--- a/.electron-vue/dev-runner.js
+++ b/.electron-vue/dev-runner.js
@@ -128,17 +128,21 @@ function greeting () {
const cols = process.stdout.columns
let text = ''
- if (cols > 104) text = 'electron-vue'
- else if (cols > 76) text = 'electron-|vue'
- else text = false
+ if (cols > 104) {
+ text = 'motrix-dev'
+ } else if (cols > 76) {
+ text = 'motrix-|dev'
+ } else {
+ text = false
+ }
if (text) {
say(text, {
- colors: ['yellow'],
+ colors: ['magentaBright'],
font: 'simple3d',
space: false
})
- } else console.log(chalk.yellow.bold('\n electron-vue'))
+ } else console.log(chalk.magentaBright.bold('\n motrix-dev'))
console.log(chalk.blue(' getting ready...') + '\n')
}
diff --git a/extra/darwin/arm64/engine/aria2c b/extra/darwin/arm64/engine/aria2c
index 9509bf47..21f757f5 100755
Binary files a/extra/darwin/arm64/engine/aria2c and b/extra/darwin/arm64/engine/aria2c differ
diff --git a/extra/darwin/x64/engine/aria2c b/extra/darwin/x64/engine/aria2c
index c253b2a4..62e6b655 100755
Binary files a/extra/darwin/x64/engine/aria2c and b/extra/darwin/x64/engine/aria2c differ
diff --git a/extra/linux/engine/aria2c b/extra/linux/engine/aria2c
index 1310525d..f35069c9 100755
Binary files a/extra/linux/engine/aria2c and b/extra/linux/engine/aria2c differ
diff --git a/extra/win32/ia32/engine/aria2c.exe b/extra/win32/ia32/engine/aria2c.exe
old mode 100644
new mode 100755
index dcb0669f..0741331f
Binary files a/extra/win32/ia32/engine/aria2c.exe and b/extra/win32/ia32/engine/aria2c.exe differ
diff --git a/extra/win32/x64/engine/aria2c.exe b/extra/win32/x64/engine/aria2c.exe
old mode 100644
new mode 100755
index 665a848e..d950831a
Binary files a/extra/win32/x64/engine/aria2c.exe and b/extra/win32/x64/engine/aria2c.exe differ
diff --git a/package.json b/package.json
index 23440d86..58ce00b9 100644
--- a/package.json
+++ b/package.json
@@ -43,7 +43,7 @@
"electron-store": "^8.1.0",
"electron-updater": "^5.3.0",
"element-ui": "^2.15.13",
- "i18next": "^22.4.12",
+ "i18next": "^22.4.13",
"lodash": "^4.17.21",
"node-fetch": "^2.6.1",
"normalize.css": "^8.0.1",
@@ -85,7 +85,6 @@
"eslint": "^7.32.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-plugin-import": "^2.27.5",
- "eslint-plugin-n": "^15.6.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-vue": "^9.9.0",
@@ -101,9 +100,9 @@
"vue-loader": "^15.10.1",
"vue-style-loader": "^4.1.3",
"vue-template-compiler": "^2.7.14",
- "webpack": "^5.76.2",
+ "webpack": "^5.77.0",
"webpack-cli": "^5.0.1",
- "webpack-dev-server": "^4.12.0",
+ "webpack-dev-server": "^4.13.1",
"webpack-hot-middleware": "^2.25.3",
"webpack-merge": "^5.8.0",
"worker-loader": "^3.0.8"
diff --git a/src/main/Application.js b/src/main/Application.js
index 990b60cb..f9809087 100644
--- a/src/main/Application.js
+++ b/src/main/Application.js
@@ -713,7 +713,7 @@ export default class Application extends EventEmitter {
})
this.on('application:setup-protocols-client', (protocols) => {
- if (is.dev() || is.mas()) {
+ if (is.dev() || is.mas() || !protocols) {
return
}
logger.info('[Motrix] setup protocols client:', protocols)
diff --git a/src/main/ui/ThemeManager.js b/src/main/ui/ThemeManager.js
index b77dbc43..e23856c8 100644
--- a/src/main/ui/ThemeManager.js
+++ b/src/main/ui/ThemeManager.js
@@ -1,6 +1,5 @@
import { EventEmitter } from 'events'
import { nativeTheme } from 'electron'
-import is from 'electron-is'
import { APP_THEME } from '@shared/constants'
import logger from '../core/Logger'
@@ -25,10 +24,6 @@ export default class ThemeManager extends EventEmitter {
}
handleEvents () {
- if (!is.macOS()) {
- return
- }
-
nativeTheme.on('updated', () => {
const theme = getSystemTheme()
this.systemTheme = theme
diff --git a/src/renderer/components/Preference/Basic.vue b/src/renderer/components/Preference/Basic.vue
index 2d8cc798..aa56ad39 100644
--- a/src/renderer/components/Preference/Basic.vue
+++ b/src/renderer/components/Preference/Basic.vue
@@ -202,7 +202,7 @@
v-model="form.maxConcurrentDownloads"
controls-position="right"
:min="1"
- :max="10"
+ :max="maxConcurrentDownloads"
:label="$t('preferences.max-concurrent-downloads')">
</el-input-number>
</el-col>
@@ -273,7 +273,7 @@
convertLineToComma,
diffConfig
} from '@shared/utils'
- import { APP_RUN_MODE } from '@shared/constants'
+ import { APP_RUN_MODE, ENGINE_MAX_CONCURRENT_DOWNLOADS } from '@shared/constants'
import { reduceTrackerString } from '@shared/utils/tracker'
const initForm = (config) => {
@@ -371,6 +371,9 @@
title () {
return this.$t('preferences.basic')
},
+ maxConcurrentDownloads () {
+ return ENGINE_MAX_CONCURRENT_DOWNLOADS
+ },
runModes () {
return [
{
diff --git a/src/renderer/components/Task/AddTask.vue b/src/renderer/components/Task/AddTask.vue
index d380aa3c..ffb0bf5f 100644
--- a/src/renderer/components/Task/AddTask.vue
+++ b/src/renderer/components/Task/AddTask.vue
@@ -1,7 +1,7 @@
<template>
<el-dialog
custom-class="tab-title-dialog add-task-dialog"
- width="64vw"
+ width="67vw"
:visible="visible"
:before-close="handleClose"
@open="handleOpen"
@@ -129,7 +129,7 @@
</el-input>
</el-form-item>
<el-row :gutter="12">
- <el-col :span="15" :xs="24">
+ <el-col :span="16" :xs="24">
<el-form-item
:label="`${$t('task.task-proxy')}: `"
:label-width="formLabelWidth"
@@ -140,7 +140,7 @@
</el-input>
</el-form-item>
</el-col>
- <el-col :span="9" :xs="24">
+ <el-col :span="8" :xs="24">
<div class="help-link">
<a target="_blank" href="https://github.com/agalwood/Motrix/wiki/Proxy" rel="noopener noreferrer">
{{ $t('preferences.proxy-tips') }}
@@ -212,7 +212,7 @@
},
data () {
return {
- formLabelWidth: '100px',
+ formLabelWidth: '110px',
showAdvanced: false,
form: {},
rules: {}
diff --git a/src/renderer/utils/native.js b/src/renderer/utils/native.js
index 641679ae..f0c851d5 100644
--- a/src/renderer/utils/native.js
+++ b/src/renderer/utils/native.js
@@ -1,4 +1,3 @@
-import is from 'electron-is'
import { shell, nativeTheme } from '@electron/remote'
import { access, constants } from 'fs'
import { resolve } from 'path'
@@ -110,12 +109,7 @@ export const moveTaskFilesToTrash = (task) => {
}
export function getSystemTheme () {
- let result = APP_THEME.LIGHT
- if (!is.macOS()) {
- return result
- }
- result = nativeTheme.shouldUseDarkColors ? APP_THEME.DARK : APP_THEME.LIGHT
- return result
+ return nativeTheme.shouldUseDarkColors ? APP_THEME.DARK : APP_THEME.LIGHT
}
export const delayDeleteTaskFiles = (task, delay) => {
diff --git a/src/shared/aria2/lib/JSONRPCClient.js b/src/shared/aria2/lib/JSONRPCClient.js
index 4617cdef..ba75bddc 100644
--- a/src/shared/aria2/lib/JSONRPCClient.js
+++ b/src/shared/aria2/lib/JSONRPCClient.js
@@ -1,13 +1,13 @@
'use strict'
+import { EventEmitter } from 'events'
+import _fetch from 'node-fetch'
+import _WebSocket from 'ws'
import { JSONRPCError } from './JSONRPCError'
+
const Deferred = require('./Deferred')
const promiseEvent = require('./promiseEvent')
-const _WebSocket = require('ws')
-const _fetch = require('node-fetch')
-const EventEmitter = require('events')
-
const WebSocket = global.WebSocket || _WebSocket
const fetch = global.fetch ? global.fetch.bind(global) : _fetch
diff --git a/src/shared/aria2/lib/debug.js b/src/shared/aria2/lib/debug.js
index fc8f8e78..4f7e725b 100644
--- a/src/shared/aria2/lib/debug.js
+++ b/src/shared/aria2/lib/debug.js
@@ -1,6 +1,6 @@
'use strict'
-const { inspect } = require('util')
+import { inspect } from 'util'
module.exports = (aria2) => {
aria2.on('open', () => {
diff --git a/src/shared/constants.js b/src/shared/constants.js
index f8246a38..fc9daa53 100644
--- a/src/shared/constants.js
+++ b/src/shared/constants.js
@@ -28,6 +28,8 @@ export const TASK_STATUS = {
export const ENGINE_RPC_HOST = '127.0.0.1'
export const ENGINE_RPC_PORT = 16800
+export const ENGINE_MAX_CONCURRENT_DOWNLOADS = 10
+export const ENGINE_MAX_CONNECTION_PER_SERVER = 64
export const UNKNOWN_PEERID = '%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00'
export const UNKNOWN_PEERID_NAME = 'unknown'
@@ -159,8 +161,6 @@ export const trackerSourceOptions = [
export const NONE_SELECTED_FILES = 'none'
export const SELECTED_ALL_FILES = 'all'
-export const ENGINE_MAX_CONNECTION_PER_SERVER = 64
-
export const IP_VERSION = {
V4: 4,
V6: 6
diff --git a/yarn.lock b/yarn.lock
index 636f984d..db31c50f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1028,6 +1028,13 @@
minimatch "^3.0.4"
plist "^3.0.4"
+"@eslint-community/eslint-utils@^4.3.0":
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
+ integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==
+ dependencies:
+ eslint-visitor-keys "^3.3.0"
+
"@eslint/eslintrc@^0.4.3":
version "0.4.3"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c"
@@ -2253,13 +2260,6 @@ [email protected]:
stat-mode "^1.0.0"
temp-file "^3.4.0"
-builtins@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9"
- integrity sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==
- dependencies:
- semver "^7.0.0"
-
version "3.0.0"
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"
@@ -3420,14 +3420,6 @@ eslint-plugin-es@^3.0.0:
eslint-utils "^2.0.0"
regexpp "^3.0.0"
-eslint-plugin-es@^4.1.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz#f0822f0c18a535a97c3e714e89f88586a7641ec9"
- integrity sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==
- dependencies:
- eslint-utils "^2.0.0"
- regexpp "^3.0.0"
-
eslint-plugin-import@^2.27.5:
version "2.27.5"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz#876a6d03f52608a3e5bb439c2550588e51dd6c65"
@@ -3449,20 +3441,6 @@ eslint-plugin-import@^2.27.5:
semver "^6.3.0"
tsconfig-paths "^3.14.1"
-eslint-plugin-n@^15.6.1:
- version "15.6.1"
- resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-15.6.1.tgz#f7e77f24abb92a550115cf11e29695da122c398c"
- integrity sha512-R9xw9OtCRxxaxaszTQmQAlPgM+RdGjaL1akWuY/Fv9fRAi8Wj4CUKc6iYVG8QNRjRuo8/BqVYIpfqberJUEacA==
- dependencies:
- builtins "^5.0.1"
- eslint-plugin-es "^4.1.0"
- eslint-utils "^3.0.0"
- ignore "^5.1.1"
- is-core-module "^2.11.0"
- minimatch "^3.1.2"
- resolve "^1.22.1"
- semver "^7.3.8"
-
eslint-plugin-node@^11.1.0:
version "11.1.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d"
@@ -3481,11 +3459,11 @@ eslint-plugin-promise@^6.1.1:
integrity sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==
eslint-plugin-vue@^9.9.0:
- version "9.9.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-9.9.0.tgz#ac788ebccd2eb94d846a507df55da50693b80c91"
- integrity sha512-YbubS7eK0J7DCf0U2LxvVP7LMfs6rC6UltihIgval3azO3gyDwEGVgsCMe1TmDiEkl6GdMKfRpaME6QxIYtzDQ==
+ version "9.10.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-9.10.0.tgz#bb6423166e6eab800344245b6eef6ce9480c78a7"
+ integrity sha512-2MgP31OBf8YilUvtakdVMc8xVbcMp7z7/iQj8LHVpXrSXHPXSJRUIGSPFI6b6pyCx/buKaFJ45ycqfHvQRiW2g==
dependencies:
- eslint-utils "^3.0.0"
+ "@eslint-community/eslint-utils" "^4.3.0"
natural-compare "^1.4.0"
nth-check "^2.0.1"
postcss-selector-parser "^6.0.9"
@@ -3516,13 +3494,6 @@ eslint-utils@^2.0.0, eslint-utils@^2.1.0:
dependencies:
eslint-visitor-keys "^1.1.0"
-eslint-utils@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672"
- integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==
- dependencies:
- eslint-visitor-keys "^2.0.0"
-
eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e"
@@ -4364,10 +4335,10 @@ human-signals@^2.1.0:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==
-i18next@^22.4.12:
- version "22.4.12"
- resolved "https://registry.npmjs.org/i18next/-/i18next-22.4.12.tgz#fde322c186501ea1adcdfac41b2d2552b26eab42"
- integrity sha512-2lE+vRXxQ3lGLub1CVbwgO0IfkLHmUSDVOAVdPh22CsxttMXi+35n2qgxh2wZIkKl6t/NMzPfgFPRDiFQOmiCg==
+i18next@^22.4.13:
+ version "22.4.13"
+ resolved "https://registry.yarnpkg.com/i18next/-/i18next-22.4.13.tgz#02e291ab0056eab13b7d356fb454ff991923eaa0"
+ integrity sha512-GX7flMHRRqQA0I1yGLmaZ4Hwt1JfLqagk8QPDPZsqekbKtXsuIngSVWM/s3SLgNkrEXjA+0sMGNuOEkkmyqmWg==
dependencies:
"@babel/runtime" "^7.20.6"
@@ -6368,7 +6339,7 @@ semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semve
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
-semver@^7.0.0, semver@^7.2.1, semver@^7.3.2, semver@^7.3.5, semver@^7.3.6, semver@^7.3.7, semver@^7.3.8:
+semver@^7.2.1, semver@^7.3.2, semver@^7.3.5, semver@^7.3.6, semver@^7.3.7, semver@^7.3.8:
version "7.3.8"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798"
integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==
@@ -7214,10 +7185,10 @@ webpack-dev-middleware@^5.3.1:
range-parser "^1.2.1"
schema-utils "^4.0.0"
-webpack-dev-server@^4.12.0:
- version "4.12.0"
- resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.12.0.tgz#e2dcad4d43e486c3bac48ddbf346e77ef03c7428"
- integrity sha512-XRN9YRnvOj3TQQ5w/0pR1y1xDcVnbWtNkTri46kuEbaWUPTHsWUvOyAAI7PZHLY+hsFki2kRltJjKMw7e+IiqA==
+webpack-dev-server@^4.13.1:
+ version "4.13.1"
+ resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.13.1.tgz#6417a9b5d2f528e7644b68d6ed335e392dccffe8"
+ integrity sha512-5tWg00bnWbYgkN+pd5yISQKDejRBYGEw15RaEEslH+zdbNDxxaZvEAO2WulaSaFKb5n3YG8JXsGaDsut1D0xdA==
dependencies:
"@types/bonjour" "^3.5.9"
"@types/connect-history-api-fallback" "^1.3.5"
@@ -7272,10 +7243,10 @@ webpack-sources@^3.2.3:
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde"
integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==
-webpack@^5.76.2:
- version "5.76.2"
- resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.76.2.tgz#6f80d1c1d1e3bf704db571b2504a0461fac80230"
- integrity sha512-Th05ggRm23rVzEOlX8y67NkYCHa9nTNcwHPBhdg+lKG+mtiW7XgggjAeeLnADAe7mLjJ6LUNfgHAuRRh+Z6J7w==
+webpack@^5.77.0:
+ version "5.77.0"
+ resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.77.0.tgz#dea3ad16d7ea6b84aa55fa42f4eac9f30e7eb9b4"
+ integrity sha512-sbGNjBr5Ya5ss91yzjeJTLKyfiwo5C628AFjEa6WSXcZa4E+F57om3Cc8xLb1Jh0b243AWuSYRf3dn7HVeFQ9Q==
dependencies:
"@types/eslint-scope" "^3.7.3"
"@types/estree" "^0.0.51"