Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade aria2 version to 1.36 #1411

Merged
merged 11 commits into from
Mar 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .electron-vue/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
14 changes: 9 additions & 5 deletions .electron-vue/dev-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}

Expand Down
Binary file modified extra/darwin/arm64/engine/aria2c
Binary file not shown.
Binary file modified extra/darwin/x64/engine/aria2c
Binary file not shown.
Binary file modified extra/linux/engine/aria2c
Binary file not shown.
Binary file modified extra/win32/ia32/engine/aria2c.exe
100644 → 100755
Binary file not shown.
Binary file modified extra/win32/x64/engine/aria2c.exe
100644 → 100755
Binary file not shown.
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/main/Application.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 0 additions & 5 deletions src/main/ui/ThemeManager.js
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -25,10 +24,6 @@ export default class ThemeManager extends EventEmitter {
}

handleEvents () {
if (!is.macOS()) {
return
}

nativeTheme.on('updated', () => {
const theme = getSystemTheme()
this.systemTheme = theme
Expand Down
7 changes: 5 additions & 2 deletions src/renderer/components/Preference/Basic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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) => {
Expand Down Expand Up @@ -371,6 +371,9 @@
title () {
return this.$t('preferences.basic')
},
maxConcurrentDownloads () {
return ENGINE_MAX_CONCURRENT_DOWNLOADS
},
runModes () {
return [
{
Expand Down
8 changes: 4 additions & 4 deletions src/renderer/components/Task/AddTask.vue
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -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') }}
Expand Down Expand Up @@ -212,7 +212,7 @@
},
data () {
return {
formLabelWidth: '100px',
formLabelWidth: '110px',
showAdvanced: false,
form: {},
rules: {}
Expand Down
8 changes: 1 addition & 7 deletions src/renderer/utils/native.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import is from 'electron-is'
import { shell, nativeTheme } from '@electron/remote'
import { access, constants } from 'fs'
import { resolve } from 'path'
Expand Down Expand Up @@ -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) => {
Expand Down
8 changes: 4 additions & 4 deletions src/shared/aria2/lib/JSONRPCClient.js
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/shared/aria2/lib/debug.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const { inspect } = require('util')
import { inspect } from 'util'

module.exports = (aria2) => {
aria2.on('open', () => {
Expand Down
4 changes: 2 additions & 2 deletions src/shared/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down
77 changes: 24 additions & 53 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"

[email protected]:
version "3.0.0"
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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==
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down