Compare commits
61 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1a2de2ad88 | |||
| e44587035d | |||
| 43f1adcd84 | |||
| 8a900459b5 | |||
| d2f8a4599d | |||
| 9159fb36ab | |||
| 5be05395f5 | |||
| fba76df945 | |||
| 5bb4f259cd | |||
| 4b093a1a4f | |||
| 134d81b205 | |||
| d5fc962bca | |||
| 0d1b76d523 | |||
| 6499ce91b8 | |||
| 2d7907f218 | |||
| 97c1cb0418 | |||
| be585ef102 | |||
| 03002221e7 | |||
| 79495cbde5 | |||
| a93d183988 | |||
| cf082b20d8 | |||
| ec21cc57bc | |||
| 5a42e4014b | |||
| 02d4032283 | |||
| d676dbe213 | |||
| 8b531c76b8 | |||
| 22f92df299 | |||
| eaf91e15e8 | |||
| 4535cb706a | |||
| a093f3beca | |||
| 287c9038b1 | |||
| 72aac9c0c6 | |||
| cdac88371c | |||
| 678bed53dc | |||
| 1f805c3440 | |||
| c8dcb1023f | |||
| a0e7eb84ca | |||
| fdf0bb8320 | |||
| e2338757de | |||
| c0cbfb5cb2 | |||
| fddaa72ac6 | |||
| 1e531f166b | |||
| 97f54adc49 | |||
| e6548d5548 | |||
| 137fdf2b26 | |||
| 10ef4f7318 | |||
| bdd5e56c2a | |||
| a851ec5830 | |||
| 7b41a9e1c6 | |||
| 012e5ece00 | |||
| db8d3d1aec | |||
| 8e35dde082 | |||
| 5c2acf12ee | |||
| e710ccdb34 | |||
| 1164df87e3 | |||
| 71232603a5 | |||
| 286013b2f0 | |||
| 87857eba94 | |||
| 3059d1a0b7 | |||
| 5029f98153 | |||
| ce80af7ead |
@@ -0,0 +1,76 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||
level of experience, education, socio-economic status, nationality, personal
|
||||
appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at agalwood.net@gmail.com. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see
|
||||
https://www.contributor-covenant.org/faq
|
||||
+2
-1
@@ -24,9 +24,10 @@ Motrix 是一款全能的下载工具,支持下载 HTTP、FTP、BT、磁力链
|
||||
|
||||
建议使用安装包(Motrix-Setup-x.y.z.exe)安装 Motrix 以确保完整的体验,例如关联 torrent 文件,捕获磁力链等。
|
||||
|
||||
如果你更喜欢便携版,你可以使用 [scoop](https://github.com/lukesampson/scoop)(需要 Windows 7+)安装最新便携版本的 Motrix。
|
||||
如果你更喜欢便携版,你可以使用 [scoop](https://github.com/lukesampson/scoop)(需要 Windows 7+,天朝用户可能需要设置 Git 代理)安装最新便携版本的 Motrix。
|
||||
|
||||
```bash
|
||||
scoop bucket add extras
|
||||
scoop install motrix
|
||||
```
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ It is recommended to install Motrix using the installation package (Motrix-Setup
|
||||
If you prefer the portable version, you can use [scoop](https://github.com/lukesampson/scoop) (need Windows 7+) to install Motrix.
|
||||
|
||||
```bash
|
||||
scoop bucket add extras
|
||||
scoop install motrix
|
||||
```
|
||||
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
provider: generic
|
||||
url: 'https://motrix.app/release/'
|
||||
url: 'https://dl.motrix.app/release/'
|
||||
|
||||
@@ -111,3 +111,12 @@ bt-save-metadata=false
|
||||
# all files are assumed to be selected. Please use this option with care
|
||||
# because it will actually remove files from your disk. Default: false
|
||||
bt-remove-unselected-file=true
|
||||
# Verify the peer using certificates specified
|
||||
# in --ca-certificate option. Default: true
|
||||
check-certificate=false
|
||||
# Exclude seed only downloads when counting concurrent active downloads (See -j option).
|
||||
# This means that if -j3 is given and this option is turned on and 3 downloads are active and one of those enters seed mode,
|
||||
# then it is excluded from active download count (thus it becomes 2),
|
||||
# and the next download waiting in queue gets started.
|
||||
# But be aware that seeding item is still recognized as active download in RPC method. Default: false
|
||||
bt-detach-seed-only=true
|
||||
|
||||
@@ -111,3 +111,12 @@ bt-save-metadata=false
|
||||
# all files are assumed to be selected. Please use this option with care
|
||||
# because it will actually remove files from your disk. Default: false
|
||||
bt-remove-unselected-file=true
|
||||
# Verify the peer using certificates specified
|
||||
# in --ca-certificate option. Default: true
|
||||
check-certificate=false
|
||||
# Exclude seed only downloads when counting concurrent active downloads (See -j option).
|
||||
# This means that if -j3 is given and this option is turned on and 3 downloads are active and one of those enters seed mode,
|
||||
# then it is excluded from active download count (thus it becomes 2),
|
||||
# and the next download waiting in queue gets started.
|
||||
# But be aware that seeding item is still recognized as active download in RPC method. Default: false
|
||||
bt-detach-seed-only=true
|
||||
|
||||
@@ -111,3 +111,12 @@ bt-save-metadata=false
|
||||
# all files are assumed to be selected. Please use this option with care
|
||||
# because it will actually remove files from your disk. Default: false
|
||||
bt-remove-unselected-file=true
|
||||
# Verify the peer using certificates specified
|
||||
# in --ca-certificate option. Default: true
|
||||
check-certificate=false
|
||||
# Exclude seed only downloads when counting concurrent active downloads (See -j option).
|
||||
# This means that if -j3 is given and this option is turned on and 3 downloads are active and one of those enters seed mode,
|
||||
# then it is excluded from active download count (thus it becomes 2),
|
||||
# and the next download waiting in queue gets started.
|
||||
# But be aware that seeding item is still recognized as active download in RPC method. Default: false
|
||||
bt-detach-seed-only=true
|
||||
|
||||
Generated
+2210
-1792
File diff suppressed because it is too large
Load Diff
+32
-25
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Motrix",
|
||||
"version": "1.3.8",
|
||||
"version": "1.4.1",
|
||||
"description": "A full-featured download manager",
|
||||
"homepage": "https://motrix.app",
|
||||
"author": {
|
||||
@@ -27,7 +27,7 @@
|
||||
"pack": "npm run pack:main && npm run pack:renderer",
|
||||
"pack:main": "cross-env NODE_ENV=production webpack --mode production --progress --colors --config .electron-vue/webpack.main.config.js",
|
||||
"pack:renderer": "cross-env NODE_ENV=production webpack --mode production --progress --colors --config .electron-vue/webpack.renderer.config.js",
|
||||
"postinstall": "npm run lint:fix"
|
||||
"postinstall": "electron-builder install-app-deps && npm run lint:fix"
|
||||
},
|
||||
"build": {
|
||||
"productName": "Motrix",
|
||||
@@ -60,6 +60,12 @@
|
||||
"schemes": [
|
||||
"magnet"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Thunder Protocol",
|
||||
"schemes": [
|
||||
"thunder"
|
||||
]
|
||||
}
|
||||
],
|
||||
"dmg": {
|
||||
@@ -154,7 +160,7 @@
|
||||
"publish": [
|
||||
{
|
||||
"provider": "generic",
|
||||
"url": "https://motrix.app/release/"
|
||||
"url": "https://dl.motrix.app/release/"
|
||||
},
|
||||
{
|
||||
"provider": "github"
|
||||
@@ -162,26 +168,27 @@
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@panter/vue-i18next": "^0.15.0",
|
||||
"@panter/vue-i18next": "^0.15.1",
|
||||
"aria2": "^4.0.3",
|
||||
"axios": "^0.18.0",
|
||||
"axios": "^0.19.0",
|
||||
"blob-util": "^2.0.2",
|
||||
"clipboard-polyfill": "^2.8.0",
|
||||
"electron-debug": "^2.2.0",
|
||||
"clipboard-polyfill": "^2.8.1",
|
||||
"electron-debug": "^3.0.0",
|
||||
"electron-is": "^3.0.0",
|
||||
"electron-log": "^3.0.5",
|
||||
"electron-updater": "^4.0.9",
|
||||
"element-ui": "^2.7.2",
|
||||
"electron-log": "^3.0.6",
|
||||
"electron-updater": "^4.0.12",
|
||||
"element-ui": "^2.9.1",
|
||||
"forever-monitor": "^1.7.1",
|
||||
"i18next": "^15.0.9",
|
||||
"i18next": "^17.0.3",
|
||||
"lodash": "^4.17.11",
|
||||
"normalize.css": "^8.0.1",
|
||||
"parse-torrent": "^6.1.2",
|
||||
"randomatic": "^3.1.1",
|
||||
"svg-innerhtml": "^1.1.0",
|
||||
"vue": "^2.6.10",
|
||||
"vue-electron": "^1.0.6",
|
||||
"vue-router": "^3.0.6",
|
||||
"vuex": "^3.1.0",
|
||||
"vuex": "^3.1.1",
|
||||
"vuex-router-sync": "^5.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -191,7 +198,7 @@
|
||||
"@vue/eslint-config-standard": "^4.0.0",
|
||||
"ajv": "^6.10.0",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"babel-eslint": "^10.0.2",
|
||||
"babel-loader": "^7.1.5",
|
||||
"babel-plugin-component": "^1.1.1",
|
||||
"babel-plugin-transform-runtime": "^6.23.0",
|
||||
@@ -199,17 +206,17 @@
|
||||
"babel-preset-stage-0": "^6.24.1",
|
||||
"babel-register": "^6.26.0",
|
||||
"babili-webpack-plugin": "^0.1.2",
|
||||
"cfonts": "^2.4.2",
|
||||
"cfonts": "^2.4.3",
|
||||
"chalk": "^2.4.2",
|
||||
"copy-webpack-plugin": "^5.0.3",
|
||||
"cross-env": "^5.1.6",
|
||||
"css-loader": "^2.1.1",
|
||||
"del": "^4.1.0",
|
||||
"del": "^4.1.1",
|
||||
"devtron": "^1.4.0",
|
||||
"electron": "^4.1.5",
|
||||
"electron-builder": "^20.39.0",
|
||||
"electron": "^4.2.4",
|
||||
"electron-builder": "^20.43.0",
|
||||
"electron-devtools-installer": "^2.2.4",
|
||||
"electron-notarize": "^0.0.5",
|
||||
"electron-notarize": "^0.1.1",
|
||||
"electron-osx-sign": "^0.4.11",
|
||||
"electron-store": "^2.0.0",
|
||||
"eslint": "^5.16.0",
|
||||
@@ -217,17 +224,17 @@
|
||||
"eslint-friendly-formatter": "^4.0.1",
|
||||
"eslint-loader": "^2.1.2",
|
||||
"eslint-plugin-html": "^4.0.6",
|
||||
"eslint-plugin-import": "^2.17.2",
|
||||
"eslint-plugin-import": "^2.17.3",
|
||||
"eslint-plugin-node": "^8.0.1",
|
||||
"eslint-plugin-promise": "^4.1.1",
|
||||
"eslint-plugin-standard": "^4.0.0",
|
||||
"eslint-plugin-vue": "^5.2.2",
|
||||
"file-loader": "^3.0.1",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"mini-css-extract-plugin": "0.6.0",
|
||||
"mini-css-extract-plugin": "0.7.0",
|
||||
"multispinner": "^0.2.1",
|
||||
"node-loader": "^0.6.0",
|
||||
"node-sass": "^4.10.0",
|
||||
"node-sass": "^4.12.0",
|
||||
"optimize-css-assets-webpack-plugin": "^5.0.1",
|
||||
"sass-loader": "^7.1.0",
|
||||
"style-loader": "^0.23.1",
|
||||
@@ -236,10 +243,10 @@
|
||||
"vue-loader": "^15.7.0",
|
||||
"vue-style-loader": "^4.1.2",
|
||||
"vue-template-compiler": "^2.6.10",
|
||||
"webpack": "^4.30.0",
|
||||
"webpack-cli": "^3.3.1",
|
||||
"webpack-dev-server": "^3.3.1",
|
||||
"webpack-hot-middleware": "^2.24.3",
|
||||
"webpack": "^4.33.0",
|
||||
"webpack-cli": "^3.3.4",
|
||||
"webpack-dev-server": "^3.7.1",
|
||||
"webpack-hot-middleware": "^2.25.0",
|
||||
"webpack-merge": "^4.2.1"
|
||||
}
|
||||
}
|
||||
|
||||
+18
-2
@@ -197,7 +197,10 @@ export default class Application extends EventEmitter {
|
||||
if (is.dev() || is.mas()) {
|
||||
return
|
||||
}
|
||||
this.protocolManager = new ProtocolManager()
|
||||
const protocols = this.configManager.getUserConfig('protocols', {})
|
||||
this.protocolManager = new ProtocolManager({
|
||||
protocols
|
||||
})
|
||||
}
|
||||
|
||||
handleProtocol (url) {
|
||||
@@ -257,6 +260,7 @@ export default class Application extends EventEmitter {
|
||||
handleUpdaterEvents () {
|
||||
this.updateManager.on('checking', (event) => {
|
||||
this.menuManager.updateMenuItemEnabledState('app.check-for-updates', false)
|
||||
this.trayManager.updateMenuItemEnabledState('app.check-for-updates', false)
|
||||
})
|
||||
|
||||
this.updateManager.on('download-progress', (event) => {
|
||||
@@ -266,10 +270,12 @@ export default class Application extends EventEmitter {
|
||||
|
||||
this.updateManager.on('update-not-available', (event) => {
|
||||
this.menuManager.updateMenuItemEnabledState('app.check-for-updates', true)
|
||||
this.trayManager.updateMenuItemEnabledState('app.check-for-updates', true)
|
||||
})
|
||||
|
||||
this.updateManager.on('update-downloaded', (event) => {
|
||||
this.menuManager.updateMenuItemEnabledState('app.check-for-updates', true)
|
||||
this.trayManager.updateMenuItemEnabledState('app.check-for-updates', true)
|
||||
const win = this.windowManager.getWindow('index')
|
||||
win.setProgressBar(0)
|
||||
})
|
||||
@@ -280,6 +286,7 @@ export default class Application extends EventEmitter {
|
||||
|
||||
this.updateManager.on('update-error', (event) => {
|
||||
this.menuManager.updateMenuItemEnabledState('app.check-for-updates', true)
|
||||
this.trayManager.updateMenuItemEnabledState('app.check-for-updates', true)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -373,6 +380,14 @@ export default class Application extends EventEmitter {
|
||||
app.clearRecentDocuments()
|
||||
})
|
||||
|
||||
this.on('application:setup-protocols-client', (protocols) => {
|
||||
if (is.dev() || is.mas()) {
|
||||
return
|
||||
}
|
||||
console.log('this.protocolManager', protocols)
|
||||
this.protocolManager.setup(protocols)
|
||||
})
|
||||
|
||||
this.on('help:official-website', () => {
|
||||
const url = 'https://motrix.app/'
|
||||
shell.openExternal(url)
|
||||
@@ -401,7 +416,8 @@ export default class Application extends EventEmitter {
|
||||
})
|
||||
|
||||
ipcMain.on('update-menu-states', (event, visibleStates, enabledStates, checkedStates) => {
|
||||
this.menuManager.updateStates(visibleStates, enabledStates, checkedStates)
|
||||
this.menuManager.updateMenuStates(visibleStates, enabledStates, checkedStates)
|
||||
this.trayManager.updateMenuStates(visibleStates, enabledStates, checkedStates)
|
||||
})
|
||||
|
||||
ipcMain.on('download-status-change', (event, status) => {
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
export default [
|
||||
'udp://62.138.0.158:6969/announce',
|
||||
'udp://93.158.213.92:1337/announce',
|
||||
'udp://185.225.17.100:1337/announce',
|
||||
'udp://151.80.120.112:2710/announce',
|
||||
'udp://151.80.120.114:2710/announce',
|
||||
'udp://185.19.107.254:80/announce',
|
||||
'udp://208.83.20.20:6969/announce',
|
||||
'udp://5.206.27.172:6969/announce',
|
||||
'udp://176.31.241.153:80/announce',
|
||||
'udp://37.235.174.46:2710/announce',
|
||||
'udp://95.211.168.204:2710/announce',
|
||||
'udp://159.100.245.181:6969/announce',
|
||||
'http://51.68.122.172:80/announce',
|
||||
'udp://89.234.156.205:451/announce',
|
||||
'udp://184.105.151.164:6969/announce',
|
||||
'udp://51.15.40.114:80/announce',
|
||||
'http://82.209.230.66:80/announce',
|
||||
'udp://185.83.215.123:6969/announce',
|
||||
'udp://195.154.52.99:80/announce',
|
||||
'http://51.38.230.101:80/announce',
|
||||
'udp://tracker.coppersurfer.tk:6969/announce',
|
||||
'udp://tracker.opentrackr.org:1337/announce',
|
||||
'udp://tracker.internetwarriors.net:1337/announce',
|
||||
'udp://9.rarbg.to:2710/announce',
|
||||
'udp://9.rarbg.me:2710/announce',
|
||||
'udp://tracker.openbittorrent.com:80/announce',
|
||||
'udp://exodus.desync.com:6969/announce',
|
||||
'udp://tracker.tiny-vps.com:6969/announce',
|
||||
'udp://thetracker.org:80/announce',
|
||||
'udp://retracker.lanta-net.ru:2710/announce',
|
||||
'udp://bt.xxx-tracker.com:2710/announce',
|
||||
'udp://tracker.cyberia.is:6969/announce',
|
||||
'http://open.acgnxtracker.com:80/announce',
|
||||
'udp://tracker.torrent.eu.org:451/announce',
|
||||
'udp://explodie.org:6969/announce',
|
||||
'udp://ipv4.tracker.harry.lu:80/announce',
|
||||
'http://retracker.mgts.by:80/announce',
|
||||
'udp://tracker.uw0.xyz:6969/announce',
|
||||
'udp://open.stealth.si:80/announce',
|
||||
'http://t.nyaatracker.com:80/announce'
|
||||
]
|
||||
@@ -1,6 +1,7 @@
|
||||
import { app } from 'electron'
|
||||
import is from 'electron-is'
|
||||
import Store from 'electron-store'
|
||||
import tracker from '../configs/tracker'
|
||||
import {
|
||||
getDhtPath,
|
||||
getLogPath,
|
||||
@@ -35,48 +36,7 @@ export default class ConfigManager {
|
||||
'all-proxy': '',
|
||||
'allow-overwrite': true,
|
||||
'auto-file-renaming': true,
|
||||
'bt-tracker': [
|
||||
'udp://62.138.0.158:6969/announce',
|
||||
'udp://188.241.58.209:6969/announce',
|
||||
'udp://188.241.58.209:6969/announce',
|
||||
'udp://208.83.20.20:6969/announce',
|
||||
'udp://151.80.120.115:2710/announce',
|
||||
'udp://185.225.17.100:1337/announce',
|
||||
'udp://151.80.120.113:2710/announce',
|
||||
'udp://62.210.88.151:1337/announce',
|
||||
'http://176.113.71.19:6961/announce',
|
||||
'http://104.27.134.253:8080/announce',
|
||||
'udp://5.2.79.219:1337/announce',
|
||||
'udp://91.216.110.52:451/announce',
|
||||
'udp://5.206.58.23:6969/announce',
|
||||
'udp://159.100.245.181:6969/announce',
|
||||
'udp://5.2.79.22:6969/announce',
|
||||
'udp://176.31.241.153:80/announce',
|
||||
'udp://95.211.168.204:2710/announce',
|
||||
'udp://188.246.227.212:80/announce',
|
||||
'udp://51.38.184.185:6969/announce',
|
||||
'udp://51.15.40.114:80/announce',
|
||||
'udp://tracker.coppersurfer.tk:6969/announce',
|
||||
'udp://tracker.open-internet.nl:6969/announce',
|
||||
'udp://tracker.leechers-paradise.org:6969/announce',
|
||||
'udp://exodus.desync.com:6969/announce',
|
||||
'udp://tracker.internetwarriors.net:1337/announce',
|
||||
'udp://9.rarbg.to:2710/announce',
|
||||
'udp://9.rarbg.me:2710/announce',
|
||||
'udp://tracker.opentrackr.org:1337/announce',
|
||||
'http://tracker3.itzmx.com:6961/announce',
|
||||
'http://tracker1.itzmx.com:8080/announce',
|
||||
'udp://open.demonii.si:1337/announce',
|
||||
'udp://tracker.torrent.eu.org:451/announce',
|
||||
'udp://tracker.tiny-vps.com:6969/announce',
|
||||
'udp://tracker.cyberia.is:6969/announce',
|
||||
'udp://denis.stalker.upeer.me:6969/announce',
|
||||
'udp://thetracker.org:80/announce',
|
||||
'udp://bt.xxx-tracker.com:2710/announce',
|
||||
'udp://open.stealth.si:80/announce',
|
||||
'udp://tracker.port443.xyz:6969/announce',
|
||||
'udp://ipv4.tracker.harry.lu:80/announce'
|
||||
].join(','),
|
||||
'bt-tracker': tracker.join(','),
|
||||
'continue': true,
|
||||
'dht-file-path': getDhtPath(4),
|
||||
'dht-file-path6': getDhtPath(6),
|
||||
@@ -117,6 +77,7 @@ export default class ConfigManager {
|
||||
'log-path': getLogPath(),
|
||||
'new-task-show-downloading': true,
|
||||
'open-at-login': false,
|
||||
'protocols': { 'magnet': true, 'thunder': false },
|
||||
'resume-all-when-app-launched': false,
|
||||
'keep-window-state': false,
|
||||
'session-path': getSessionPath(),
|
||||
|
||||
@@ -64,7 +64,7 @@ export default class Engine {
|
||||
const sh = this.getStartSh()
|
||||
logger.info('[Motrix] Engine start sh===>', sh)
|
||||
this.instance = forever.start(sh, {
|
||||
max: 10,
|
||||
max: 100,
|
||||
parser: function (command, args) {
|
||||
return {
|
||||
command: command,
|
||||
|
||||
@@ -9,28 +9,39 @@ export default class ProtocolManager extends EventEmitter {
|
||||
super()
|
||||
this.options = options
|
||||
|
||||
// package.json:build.protocols[].schemes[]
|
||||
// options.protocols: { 'magnet': true, 'thunder': false }
|
||||
this.protocols = {
|
||||
mo: true,
|
||||
motrix: true,
|
||||
...options.protocols
|
||||
}
|
||||
|
||||
this.init()
|
||||
}
|
||||
|
||||
init () {
|
||||
// package.json:build.protocols[].schemes[]
|
||||
if (!app.isDefaultProtocolClient('mo')) {
|
||||
app.setAsDefaultProtocolClient('mo')
|
||||
}
|
||||
if (!app.isDefaultProtocolClient('motrix')) {
|
||||
app.setAsDefaultProtocolClient('motrix')
|
||||
}
|
||||
if (!app.isDefaultProtocolClient('magnet')) {
|
||||
app.setAsDefaultProtocolClient('magnet')
|
||||
}
|
||||
const { protocols } = this
|
||||
this.setup(protocols)
|
||||
}
|
||||
|
||||
setup (protocols) {
|
||||
Object.keys(protocols).forEach((protocol) => {
|
||||
const enabled = protocols[protocol]
|
||||
if (enabled) {
|
||||
if (!app.isDefaultProtocolClient(protocol)) {
|
||||
app.setAsDefaultProtocolClient(protocol)
|
||||
}
|
||||
} else {
|
||||
app.removeAsDefaultProtocolClient(protocol)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
handle (url) {
|
||||
logger.info(`[Motrix] protocol url: ${url}`)
|
||||
|
||||
if (url.toLowerCase().startsWith('magnet:')) {
|
||||
return this.handleMagnetProtocol(url)
|
||||
}
|
||||
this.handleMagnetAndThunderProtocol(url)
|
||||
|
||||
if (
|
||||
url.toLowerCase().startsWith('mo:') ||
|
||||
@@ -40,11 +51,21 @@ export default class ProtocolManager extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
handleMagnetProtocol (url) {
|
||||
handleMagnetAndThunderProtocol (url) {
|
||||
if (!url) {
|
||||
return
|
||||
}
|
||||
logger.error(`[Motrix] handleMagnetProtocol url: ${url}`)
|
||||
let protocolTag = ''
|
||||
|
||||
if (url.toLowerCase().startsWith('magnet:')) {
|
||||
protocolTag = 'handleMagnetProtocol'
|
||||
}
|
||||
|
||||
if (url.toLowerCase().startsWith('thunder:')) {
|
||||
protocolTag = 'handleThunderProtocol'
|
||||
}
|
||||
|
||||
logger.error(`[Motrix] ${protocolTag} url: ${url}`)
|
||||
|
||||
global.application.sendCommandToAll('application:new-task', 'uri', url)
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
{ "type": "separator" },
|
||||
{ "id": "app.show", "command": "application:show", "command-arg": "index" },
|
||||
{ "id": "help.manual", "command": "help:manual" },
|
||||
{ "id": "app.check-for-updates", "command": "application:check-for-updates" },
|
||||
{ "type": "separator" },
|
||||
{ "id": "app.preferences", "command": "application:preferences", "command-before": "application:show,index" },
|
||||
{ "id": "app.quit", "role": "quit" }
|
||||
|
||||
@@ -50,7 +50,7 @@ export default class MenuManager extends EventEmitter {
|
||||
this.setup()
|
||||
}
|
||||
|
||||
updateStates (visibleStates, enabledStates, checkedStates) {
|
||||
updateMenuStates (visibleStates, enabledStates, checkedStates) {
|
||||
updateStates(this.items, visibleStates, enabledStates, checkedStates)
|
||||
}
|
||||
|
||||
@@ -58,13 +58,13 @@ export default class MenuManager extends EventEmitter {
|
||||
const visibleStates = {
|
||||
[id]: flag
|
||||
}
|
||||
this.updateStates(visibleStates, null, null)
|
||||
this.updateMenuStates(visibleStates, null, null)
|
||||
}
|
||||
|
||||
updateMenuItemEnabledState (id, flag) {
|
||||
const enabledStates = {
|
||||
[id]: flag
|
||||
}
|
||||
this.updateStates(null, enabledStates, null)
|
||||
this.updateMenuStates(null, enabledStates, null)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,11 @@ import { EventEmitter } from 'events'
|
||||
import { join } from 'path'
|
||||
import { Tray, Menu, systemPreferences } from 'electron'
|
||||
import is from 'electron-is'
|
||||
import { translateTemplate } from '../utils/menu'
|
||||
import {
|
||||
translateTemplate,
|
||||
flattenMenuItems,
|
||||
updateStates
|
||||
} from '../utils/menu'
|
||||
import { getI18n } from '@/ui/Locale'
|
||||
import { LIGHT_THEME, DARK_THEME } from '@shared/constants'
|
||||
|
||||
@@ -45,6 +49,7 @@ export default class TrayManager extends EventEmitter {
|
||||
const template = JSON.parse(JSON.stringify(this.template))
|
||||
const tpl = translateTemplate(template, keystrokesByCommand, this.i18n)
|
||||
this.menu = Menu.buildFromTemplate(tpl)
|
||||
this.items = flattenMenuItems(this.menu)
|
||||
}
|
||||
|
||||
setup () {
|
||||
@@ -113,6 +118,24 @@ export default class TrayManager extends EventEmitter {
|
||||
this.updateIcon()
|
||||
}
|
||||
|
||||
updateMenuStates (visibleStates, enabledStates, checkedStates) {
|
||||
updateStates(this.items, visibleStates, enabledStates, checkedStates)
|
||||
}
|
||||
|
||||
updateMenuItemVisibleState (id, flag) {
|
||||
const visibleStates = {
|
||||
[id]: flag
|
||||
}
|
||||
this.updateMenuStates(visibleStates, null, null)
|
||||
}
|
||||
|
||||
updateMenuItemEnabledState (id, flag) {
|
||||
const enabledStates = {
|
||||
[id]: flag
|
||||
}
|
||||
this.updateMenuStates(null, enabledStates, null)
|
||||
}
|
||||
|
||||
destroy () {
|
||||
tray.destroy()
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ export default class WindowManager extends EventEmitter {
|
||||
if (!window) {
|
||||
return
|
||||
}
|
||||
logger.info('[Motrix] sendCommandTo===>', window, command, ...args)
|
||||
logger.info('[Motrix] sendCommandTo===>', command, ...args)
|
||||
window.webContents.send('command', command, ...args)
|
||||
}
|
||||
|
||||
|
||||
+14
-4
@@ -5,6 +5,7 @@ import Aria2 from 'aria2'
|
||||
import {
|
||||
separateConfig,
|
||||
compactUndefined,
|
||||
formatOptionsForEngine,
|
||||
mergeTaskResult,
|
||||
changeKeysToCamelCase,
|
||||
changeKeysToKebabCase
|
||||
@@ -57,7 +58,9 @@ export default class Api {
|
||||
rpcListenPort: port,
|
||||
rpcSecret: secret
|
||||
} = this.config
|
||||
const host = '127.0.0.1'
|
||||
this.client = new Aria2({
|
||||
host,
|
||||
port,
|
||||
secret
|
||||
})
|
||||
@@ -117,10 +120,7 @@ export default class Api {
|
||||
}
|
||||
|
||||
changeGlobalOption (options) {
|
||||
const args = {}
|
||||
Object.keys(options).forEach((key) => {
|
||||
args[key] = `${options[key]}`
|
||||
})
|
||||
const args = formatOptionsForEngine(options)
|
||||
|
||||
return this.client.call('changeGlobalOption', args)
|
||||
}
|
||||
@@ -146,6 +146,16 @@ export default class Api {
|
||||
})
|
||||
}
|
||||
|
||||
changeOption (params = {}) {
|
||||
let { gid, options = {} } = params
|
||||
options = formatOptionsForEngine(options)
|
||||
|
||||
const kebabOptions = changeKeysToKebabCase(options)
|
||||
const args = compactUndefined([gid, kebabOptions])
|
||||
|
||||
return this.client.call('changeOption', ...args)
|
||||
}
|
||||
|
||||
getGlobalStat () {
|
||||
return this.client.call('getGlobalStat')
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<g stroke-linecap="round" stroke-linejoin="round" stroke-width="2" stroke="currentColor">
|
||||
<polyline data-cap="butt" fill="none" stroke="currentColor" stroke-miterlimit="10" points="17,23 17,7 1,7 "/>
|
||||
<line data-cap="butt" fill="none" stroke="currentColor" stroke-miterlimit="10" x1="17" y1="7" x2="23" y2="1"/>
|
||||
<polygon fill="none" stroke="currentColor" stroke-miterlimit="10" points="17,23 23,17 23,1 7,1 1,7 1,23 "/>
|
||||
<circle data-color="color-2" data-stroke="none" cx="12" cy="12" r="1" stroke-linejoin="miter" stroke-linecap="square" stroke="none"/>
|
||||
<circle data-color="color-2" data-stroke="none" cx="6" cy="12" r="1" stroke-linejoin="miter" stroke-linecap="square" stroke="none"/>
|
||||
<circle data-color="color-2" data-stroke="none" cx="12" cy="18" r="1" stroke-linejoin="miter" stroke-linecap="square" stroke="none"/>
|
||||
<circle data-color="color-2" data-stroke="none" cx="6" cy="18" r="1" stroke-linejoin="miter" stroke-linecap="square" stroke="none"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,21 @@
|
||||
import Icon from '@/components/Icons/Icon'
|
||||
|
||||
Icon.register({
|
||||
'dice': {
|
||||
'width': 24,
|
||||
'height': 24,
|
||||
'raw': `<polyline data-cap="butt" fill="none" stroke="currentColor" stroke-miterlimit="10" points="17,23 17,7 1,7 "/>
|
||||
<line data-cap="butt" fill="none" stroke="currentColor" stroke-miterlimit="10" x1="17" y1="7" x2="23" y2="1"/>
|
||||
<polygon fill="none" stroke="currentColor" stroke-miterlimit="10" points="17,23 23,17 23,1 7,1 1,7 1,23 "/>
|
||||
<circle data-color="color-2" data-stroke="none" cx="12" cy="12" r="1" stroke-linejoin="miter" stroke-linecap="square" stroke="none"/>
|
||||
<circle data-color="color-2" data-stroke="none" cx="6" cy="12" r="1" stroke-linejoin="miter" stroke-linecap="square" stroke="none"/>
|
||||
<circle data-color="color-2" data-stroke="none" cx="12" cy="18" r="1" stroke-linejoin="miter" stroke-linecap="square" stroke="none"/>
|
||||
<circle data-color="color-2" data-stroke="none" cx="6" cy="18" r="1" stroke-linejoin="miter" stroke-linecap="square" stroke="none"/>`,
|
||||
'g': {
|
||||
'stroke': 'currentColor',
|
||||
'stroke-linecap': 'round',
|
||||
'stroke-linejoin': 'round',
|
||||
'stroke-width': '2'
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -50,5 +50,6 @@
|
||||
position: fixed;
|
||||
right: 36px;
|
||||
bottom: 24px;
|
||||
z-index: 20;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -40,13 +40,13 @@
|
||||
})
|
||||
},
|
||||
watch: {
|
||||
downloadSpeed: function (val, oldVal) {
|
||||
downloadSpeed (val, oldVal) {
|
||||
showDownloadSpeedInDock(val)
|
||||
},
|
||||
numActive: function (val, oldVal) {
|
||||
numActive (val, oldVal) {
|
||||
this.downloading = val > 0
|
||||
},
|
||||
downloading: function (val, oldVal) {
|
||||
downloading (val, oldVal) {
|
||||
if (val !== oldVal && this.isRenderer) {
|
||||
this.$electron.ipcRenderer.send('download-status-change', val)
|
||||
}
|
||||
@@ -59,7 +59,7 @@
|
||||
console.warn(`fetchTaskItem fail: ${e.message}`)
|
||||
})
|
||||
},
|
||||
onDownloadStart: function (event) {
|
||||
onDownloadStart (event) {
|
||||
this.$store.dispatch('task/fetchList')
|
||||
this.$store.dispatch('app/resetInterval')
|
||||
console.log('aria2 onDownloadStart', event)
|
||||
@@ -71,7 +71,7 @@
|
||||
this.$msg.info(message)
|
||||
})
|
||||
},
|
||||
onDownloadPause: function (event) {
|
||||
onDownloadPause (event) {
|
||||
console.log('aria2 onDownloadPause')
|
||||
const [{ gid }] = event
|
||||
this.fetchTaskItem({ gid })
|
||||
@@ -81,7 +81,7 @@
|
||||
this.$msg.info(message)
|
||||
})
|
||||
},
|
||||
onDownloadStop: function (event) {
|
||||
onDownloadStop (event) {
|
||||
console.log('aria2 onDownloadStop')
|
||||
const [{ gid }] = event
|
||||
this.fetchTaskItem({ gid })
|
||||
@@ -91,7 +91,7 @@
|
||||
this.$msg.info(message)
|
||||
})
|
||||
},
|
||||
onDownloadError: function (event) {
|
||||
onDownloadError (event) {
|
||||
const [{ gid }] = event
|
||||
this.fetchTaskItem({ gid })
|
||||
.then((task) => {
|
||||
@@ -109,7 +109,7 @@
|
||||
})
|
||||
})
|
||||
},
|
||||
onDownloadComplete: function (event) {
|
||||
onDownloadComplete (event) {
|
||||
console.log('aria2 onDownloadComplete')
|
||||
this.$store.dispatch('task/fetchList')
|
||||
const [{ gid }] = event
|
||||
@@ -118,7 +118,7 @@
|
||||
this.handleDownloadComplete(task, false)
|
||||
})
|
||||
},
|
||||
onBtDownloadComplete: function (event) {
|
||||
onBtDownloadComplete (event) {
|
||||
console.log('aria2 onBtDownloadComplete')
|
||||
this.$store.dispatch('task/fetchList')
|
||||
const [{ gid }] = event
|
||||
@@ -127,7 +127,7 @@
|
||||
this.handleDownloadComplete(task, true)
|
||||
})
|
||||
},
|
||||
handleDownloadComplete: function (task, isBT) {
|
||||
handleDownloadComplete (task, isBT) {
|
||||
const path = getTaskFullPath(task)
|
||||
|
||||
addToRecentTask(task)
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
this.showTaskCompleteNotify(task, isBT, path)
|
||||
},
|
||||
showTaskCompleteNotify: function (task, isBT, path) {
|
||||
showTaskCompleteNotify (task, isBT, path) {
|
||||
const taskName = getTaskName(task)
|
||||
const message = isBT
|
||||
? this.$t('task.bt-download-complete-message', { taskName })
|
||||
@@ -164,7 +164,7 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
showTaskErrorNotify: function (task) {
|
||||
showTaskErrorNotify (task) {
|
||||
const taskName = getTaskName(task)
|
||||
|
||||
const message = this.$t('task.download-fail-message', { taskName })
|
||||
@@ -179,7 +179,7 @@
|
||||
body: taskName
|
||||
})
|
||||
},
|
||||
bindEngineEvents: function () {
|
||||
bindEngineEvents () {
|
||||
api.client.on('onDownloadStart', this.onDownloadStart)
|
||||
// api.client.on('onDownloadPause', this.onDownloadPause)
|
||||
api.client.on('onDownloadStop', this.onDownloadStop)
|
||||
@@ -187,7 +187,7 @@
|
||||
api.client.on('onDownloadError', this.onDownloadError)
|
||||
api.client.on('onBtDownloadComplete', this.onBtDownloadComplete)
|
||||
},
|
||||
unbindEngineEvents: function () {
|
||||
unbindEngineEvents () {
|
||||
api.client.removeListener('onDownloadStart', this.onDownloadStart)
|
||||
// api.client.removeListener('onDownloadPause', this.onDownloadPause)
|
||||
api.client.removeListener('onDownloadStop', this.onDownloadStop)
|
||||
@@ -195,13 +195,13 @@
|
||||
api.client.removeListener('onDownloadError', this.onDownloadError)
|
||||
api.client.removeListener('onBtDownloadComplete', this.onBtDownloadComplete)
|
||||
},
|
||||
startPolling: function () {
|
||||
startPolling () {
|
||||
this.timer = setTimeout(() => {
|
||||
this.polling()
|
||||
this.startPolling()
|
||||
}, this.interval)
|
||||
},
|
||||
polling: function () {
|
||||
polling () {
|
||||
this.$store.dispatch('app/fetchGlobalStat')
|
||||
this.$store.dispatch('task/fetchList')
|
||||
|
||||
@@ -209,15 +209,15 @@
|
||||
this.$store.dispatch('task/fetchItem', this.currentTaskItem.gid)
|
||||
}
|
||||
},
|
||||
stopPolling: function () {
|
||||
stopPolling () {
|
||||
clearTimeout(this.timer)
|
||||
this.timer = null
|
||||
}
|
||||
},
|
||||
created: function () {
|
||||
created () {
|
||||
this.bindEngineEvents()
|
||||
},
|
||||
mounted: function () {
|
||||
mounted () {
|
||||
setTimeout(() => {
|
||||
this.$store.dispatch('app/fetchEngineInfo')
|
||||
this.$store.dispatch('app/fetchEngineOptions')
|
||||
@@ -225,7 +225,7 @@
|
||||
this.startPolling()
|
||||
}, 100)
|
||||
},
|
||||
destroyed: function () {
|
||||
destroyed () {
|
||||
this.$store.dispatch('task/saveSession')
|
||||
|
||||
this.unbindEngineEvents()
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
size="mini"
|
||||
:model="form"
|
||||
:rules="rules">
|
||||
<el-form-item :label="`${$t('preferences.auto-update')}: `" :label-width="formLabelWidth">
|
||||
<el-col class="form-item-sub" :span="24">
|
||||
<el-checkbox v-model="form.autoCheckUpdate">
|
||||
{{ $t('preferences.auto-check-update') }}
|
||||
</el-checkbox>
|
||||
<div class="el-form-item__info" style="margin-top: 8px;" v-if="form.lastCheckUpdateTime !== 0">
|
||||
{{ $t('preferences.last-check-update-time') + ': ' + (form.lastCheckUpdateTime !== 0 ? new
|
||||
Date(form.lastCheckUpdateTime).toLocaleString() : new Date().toLocaleString()) }}
|
||||
<span class="action-link" @click.prevent="onCheckUpdateClick">
|
||||
{{ $t('app.check-updates-now') }}
|
||||
</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${$t('preferences.proxy')}: `" :label-width="formLabelWidth">
|
||||
<el-switch
|
||||
v-model="form.useProxy"
|
||||
@@ -19,7 +33,7 @@
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="" :label-width="formLabelWidth" v-if="form.useProxy">
|
||||
<el-form-item :label-width="formLabelWidth" v-if="form.useProxy">
|
||||
<el-col class="form-item-sub" :span="16">
|
||||
<el-input
|
||||
placeholder="[http://][USER:PASSWORD@]HOST[:PORT]"
|
||||
@@ -67,7 +81,26 @@
|
||||
</a>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${$t('preferences.developer')}: `" :label-width="formLabelWidth">
|
||||
<el-form-item :label="`${$t('preferences.download-protocol')}: `" :label-width="formLabelWidth">
|
||||
{{ $t('preferences.protocols-default-client') }}
|
||||
<el-col class="form-item-sub" :span="24">
|
||||
<el-switch
|
||||
v-model="form.protocols.magnet"
|
||||
:active-text="$t('preferences.protocols-magnet')"
|
||||
@change="(val) => onProtocolsChange('magnet', val)"
|
||||
>
|
||||
</el-switch>
|
||||
</el-col>
|
||||
<el-col class="form-item-sub" :span="24">
|
||||
<el-switch
|
||||
v-model="form.protocols.thunder"
|
||||
:active-text="$t('preferences.protocols-thunder')"
|
||||
@change="(val) => onProtocolsChange('thunder', val)"
|
||||
>
|
||||
</el-switch>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${$t('preferences.security')}: `" :label-width="formLabelWidth">
|
||||
<el-col class="form-item-sub" :span="24">
|
||||
{{ $t('preferences.mock-user-agent') }}
|
||||
<el-input
|
||||
@@ -83,6 +116,27 @@
|
||||
<el-button @click="() => changeUA('du')">du</el-button>
|
||||
</el-button-group>
|
||||
</el-col>
|
||||
<el-col class="form-item-sub" :span="18">
|
||||
{{ $t('preferences.rpc-secret') }}
|
||||
<el-input
|
||||
:show-password="hideRpcSecret"
|
||||
placeholder="RPC Secret"
|
||||
:maxlength="24"
|
||||
v-model="form.rpcSecret"
|
||||
>
|
||||
<i slot="append" @click.prevent="onDiceClick">
|
||||
<mo-icon name="dice" width="12" height="12" />
|
||||
</i>
|
||||
</el-input>
|
||||
<div class="el-form-item__info" style="margin-top: 8px;">
|
||||
<a target="_blank" href="https://github.com/agalwood/Motrix/wiki/RPC" rel="noopener noreferrer">
|
||||
{{ $t('preferences.rpc-secret-tips') }}
|
||||
<mo-icon name="link" width="12" height="12" />
|
||||
</a>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${$t('preferences.developer')}: `" :label-width="formLabelWidth">
|
||||
<el-col class="form-item-sub" :span="24">
|
||||
{{ $t('preferences.app-log-path') }}
|
||||
<el-input placeholder="" disabled v-model="logPath">
|
||||
@@ -122,14 +176,18 @@
|
||||
import is from 'electron-is'
|
||||
import { mapState } from 'vuex'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import randomize from 'randomatic'
|
||||
import * as clipboard from 'clipboard-polyfill'
|
||||
import ShowInFolder from '@/components/Native/ShowInFolder'
|
||||
import userAgentMap from '@shared/ua'
|
||||
import {
|
||||
buildRpcUrl,
|
||||
calcFormLabelWidth,
|
||||
convertCommaToLine,
|
||||
convertLineToComma,
|
||||
diffConfig
|
||||
} from '@shared/utils'
|
||||
import '@/components/Icons/dice'
|
||||
import '@/components/Icons/sync'
|
||||
import '@/components/Icons/refresh'
|
||||
|
||||
@@ -137,16 +195,28 @@
|
||||
const {
|
||||
allProxy,
|
||||
allProxyBackup,
|
||||
autoCheckUpdate,
|
||||
btTracker,
|
||||
hideAppMenu,
|
||||
lastCheckUpdateTime,
|
||||
protocols,
|
||||
rpcListenPort,
|
||||
rpcSecret,
|
||||
useProxy,
|
||||
userAgent
|
||||
} = config
|
||||
const result = {
|
||||
allProxy,
|
||||
allProxyBackup,
|
||||
autoCheckUpdate,
|
||||
btTracker: convertCommaToLine(btTracker),
|
||||
hideAppMenu,
|
||||
lastCheckUpdateTime,
|
||||
protocols: {
|
||||
...protocols
|
||||
},
|
||||
rpcListenPort,
|
||||
rpcSecret,
|
||||
useProxy,
|
||||
userAgent
|
||||
}
|
||||
@@ -165,6 +235,7 @@
|
||||
form,
|
||||
formLabelWidth: calcFormLabelWidth(locale),
|
||||
formOriginal: cloneDeep(form),
|
||||
hideRpcSecret: true,
|
||||
rules: {},
|
||||
trackerSyncing: false
|
||||
}
|
||||
@@ -183,9 +254,25 @@
|
||||
})
|
||||
},
|
||||
watch: {
|
||||
'form.rpcSecret': function (val) {
|
||||
const url = buildRpcUrl({
|
||||
port: this.form.rpcListenPort,
|
||||
secret: val
|
||||
})
|
||||
clipboard.writeText(url)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isRenderer: is.renderer,
|
||||
onCheckUpdateClick () {
|
||||
this.$electron.ipcRenderer.send('command', 'application:check-for-updates')
|
||||
this.$msg.info(this.$t('app.checking-for-updates'))
|
||||
this.$store.dispatch('preference/fetchPreference')
|
||||
.then((config) => {
|
||||
const { lastCheckUpdateTime } = config
|
||||
this.form.lastCheckUpdateTime = lastCheckUpdateTime
|
||||
})
|
||||
},
|
||||
syncTrackerFromGitHub () {
|
||||
this.trackerSyncing = true
|
||||
this.$store.dispatch('preference/fetchBtTracker')
|
||||
@@ -197,6 +284,13 @@
|
||||
this.trackerSyncing = false
|
||||
})
|
||||
},
|
||||
onProtocolsChange (protocol, enabled) {
|
||||
const { protocols } = this.form
|
||||
this.form.protocols = {
|
||||
...protocols,
|
||||
[protocol]: enabled
|
||||
}
|
||||
},
|
||||
onUseProxyChange (flag) {
|
||||
this.form.allProxy = flag ? this.form.allProxyBackup : ''
|
||||
},
|
||||
@@ -210,6 +304,15 @@
|
||||
}
|
||||
this.form.userAgent = ua
|
||||
},
|
||||
onDiceClick () {
|
||||
this.hideRpcSecret = false
|
||||
const rpcSecret = randomize('Aa0', 12)
|
||||
this.form.rpcSecret = rpcSecret
|
||||
|
||||
setTimeout(() => {
|
||||
this.hideRpcSecret = true
|
||||
}, 2000)
|
||||
},
|
||||
onFactoryResetClick () {
|
||||
this.$electron.remote.dialog.showMessageBox({
|
||||
type: 'warning',
|
||||
@@ -232,7 +335,10 @@
|
||||
const changed = diffConfig(this.formOriginal, this.form)
|
||||
const data = {
|
||||
...changed,
|
||||
btTracker: convertLineToComma(this.form.btTracker)
|
||||
btTracker: convertLineToComma(this.form.btTracker),
|
||||
protocols: {
|
||||
...this.form.protocols
|
||||
}
|
||||
}
|
||||
console.log('changed====》', data)
|
||||
|
||||
@@ -246,6 +352,7 @@
|
||||
})
|
||||
|
||||
if (this.isRenderer()) {
|
||||
this.$electron.ipcRenderer.send('command', 'application:setup-protocols-client', data.protocols)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -59,15 +59,6 @@
|
||||
{{ $t('preferences.auto-resume-all') }}
|
||||
</el-checkbox>
|
||||
</el-col>
|
||||
<el-col class="form-item-sub" :span="24">
|
||||
<el-checkbox v-model="form.autoCheckUpdate">
|
||||
{{ $t('preferences.auto-check-update') }}
|
||||
</el-checkbox>
|
||||
<div class="el-form-item__info" style="margin-top: 8px;" v-if="form.lastCheckUpdateTime !== 0">
|
||||
{{ $t('preferences.last-check-update-time') + ': ' + (form.lastCheckUpdateTime !== 0 ? new
|
||||
Date(form.lastCheckUpdateTime).toLocaleString() : new Date().toLocaleString()) }}
|
||||
</div>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${$t('preferences.default-dir')}: `" :label-width="formLabelWidth">
|
||||
<el-input placeholder="" v-model="downloadDir" :readonly="isMas()">
|
||||
@@ -164,11 +155,9 @@
|
||||
|
||||
const initialForm = (config) => {
|
||||
const {
|
||||
autoCheckUpdate,
|
||||
dir,
|
||||
hideAppMenu,
|
||||
keepWindowState,
|
||||
lastCheckUpdateTime,
|
||||
locale,
|
||||
maxConcurrentDownloads,
|
||||
maxConnectionPerServer,
|
||||
@@ -182,12 +171,10 @@
|
||||
theme
|
||||
} = config
|
||||
const result = {
|
||||
autoCheckUpdate,
|
||||
continue: config.continue,
|
||||
dir,
|
||||
hideAppMenu,
|
||||
keepWindowState,
|
||||
lastCheckUpdateTime,
|
||||
locale,
|
||||
maxConcurrentDownloads,
|
||||
maxConnectionPerServer,
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
<script>
|
||||
export default {
|
||||
name: 'mo-content-preference',
|
||||
props: {
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
components: {
|
||||
@@ -25,7 +23,13 @@
|
||||
.form-preference {
|
||||
padding-right: 7%;
|
||||
.el-switch__label {
|
||||
font-weight: $--font-weight-secondary;
|
||||
font-weight: normal;
|
||||
color: $--color-text-regular;
|
||||
&.is-active {
|
||||
color: $--color-text-regular;
|
||||
}
|
||||
}
|
||||
.el-checkbox__input.is-checked + .el-checkbox__label {
|
||||
color: $--color-text-regular;
|
||||
}
|
||||
.el-form-item {
|
||||
@@ -42,13 +46,13 @@
|
||||
}
|
||||
}
|
||||
.el-form-item.el-form-item--mini {
|
||||
margin-bottom: 24px;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
.el-form-item__content {
|
||||
color: $--color-text-regular;
|
||||
}
|
||||
.form-item-sub {
|
||||
margin-bottom: 12px;
|
||||
margin-bottom: 8px;
|
||||
&:last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
@@ -59,7 +63,19 @@
|
||||
bottom: 0;
|
||||
left: auto;
|
||||
z-index: 10;
|
||||
width: -webkit-fill-available;
|
||||
box-sizing: border-box;
|
||||
padding: 24px 36px 24px 0;
|
||||
padding: 24px 36px;
|
||||
margin-left: -36px;
|
||||
// aside.width + subnav.width + padding-left + scrollbar.width
|
||||
margin-right: 322px;
|
||||
}
|
||||
.action-link {
|
||||
cursor: pointer;
|
||||
color: $--link-color;
|
||||
&:hover {
|
||||
color: $--link-hover-color;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -16,15 +16,6 @@
|
||||
{{ $t('preferences.lab-warning') }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${$t('preferences.download-protocol')}: `" :label-width="formLabelWidth">
|
||||
<el-col class="form-item-sub" :span="24">
|
||||
<el-switch
|
||||
v-model="form.enableEggFeatures"
|
||||
:active-text="$t('preferences.support-more-download-protocols')"
|
||||
>
|
||||
</el-switch>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${$t('preferences.browser-extensions')}: `" :label-width="formLabelWidth">
|
||||
<el-col class="form-item-sub" :span="24">
|
||||
<a target="_blank" href="https://motrix.app/release/BaiduExporter.zip" rel="noopener noreferrer">
|
||||
@@ -57,11 +48,9 @@
|
||||
} from '@shared/utils'
|
||||
|
||||
const initialForm = (config) => {
|
||||
const {
|
||||
enableEggFeatures
|
||||
} = config
|
||||
// const {
|
||||
// } = config
|
||||
const result = {
|
||||
enableEggFeatures
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -233,10 +233,7 @@
|
||||
if (!this.isSeeder) {
|
||||
return
|
||||
}
|
||||
this.$store.dispatch('task/pauseTask', this.task)
|
||||
.then(() => {
|
||||
this.$store.dispatch('task/resumeTask', this.task)
|
||||
})
|
||||
this.$store.dispatch('task/stopSeeding', this.task)
|
||||
},
|
||||
pauseTask () {
|
||||
const { taskName } = this
|
||||
|
||||
@@ -56,7 +56,9 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form-actions {
|
||||
background: $--dk-form-actions-background;
|
||||
}
|
||||
.panel {
|
||||
background-color: $--dk-panel-background;
|
||||
}
|
||||
@@ -235,7 +237,7 @@
|
||||
color: #e6e6e6;
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $--color-primary;
|
||||
color: $--color-primary-light-4;
|
||||
border-color: #606060;
|
||||
background-color: #333;
|
||||
}
|
||||
@@ -373,6 +375,10 @@
|
||||
color: $--dk-preference-form-text-color;
|
||||
}
|
||||
|
||||
.form-preference .el-checkbox__input.is-checked + .el-checkbox__label {
|
||||
color: $--dk-preference-form-text-color;
|
||||
}
|
||||
|
||||
.form-preference .el-form-item {
|
||||
a {
|
||||
color: #dfdfdf;
|
||||
|
||||
@@ -30,6 +30,10 @@ $--dk-panel-background: #343434 !default;
|
||||
$--dk-panel-title-color: #fff !default;
|
||||
$--dk-panel-border-color: #EBECF0 !default;
|
||||
|
||||
/* Form Actions
|
||||
-------------------------- */
|
||||
$--dk-form-actions-background: #343434 !default;
|
||||
|
||||
/* Task
|
||||
-------------------------- */
|
||||
$--dk-task-action-color: #eee !default;
|
||||
|
||||
@@ -238,3 +238,7 @@ img {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.form-actions {
|
||||
background: $--form-actions-background;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,10 @@ $--panel-background: $--color-white !default;
|
||||
$--panel-title-color: $--color-text-primary !default;
|
||||
$--panel-border-color: rgba(0, 0, 0, 0.1) !default;
|
||||
|
||||
/* Form Actions
|
||||
-------------------------- */
|
||||
$--form-actions-background: $--color-white !default;
|
||||
|
||||
/* Task
|
||||
-------------------------- */
|
||||
$--task-action-color: #4d515a !default;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,8 @@ const actions = {
|
||||
})
|
||||
})
|
||||
},
|
||||
save ({ commit }, config) {
|
||||
save ({ commit, dispatch }, config) {
|
||||
dispatch('task/saveSession', null, { root: true })
|
||||
if (isEmpty(config)) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -84,6 +84,10 @@ const actions = {
|
||||
})
|
||||
})
|
||||
},
|
||||
changeTaskOption (_, payload) {
|
||||
const { gid, options } = payload
|
||||
return api.changeOption({ gid, options })
|
||||
},
|
||||
removeTask ({ dispatch }, task) {
|
||||
const { gid } = task
|
||||
return api.forcePauseTask({ gid })
|
||||
@@ -134,6 +138,13 @@ const actions = {
|
||||
dispatch('saveSession')
|
||||
})
|
||||
},
|
||||
stopSeeding ({ dispatch }, task) {
|
||||
const { gid } = task
|
||||
const options = {
|
||||
seedTime: 0
|
||||
}
|
||||
return dispatch('changeTaskOption', { gid, options })
|
||||
},
|
||||
removeTaskRecord ({ dispatch }, task) {
|
||||
const { gid, status } = task
|
||||
if (['error', 'complete', 'removed'].indexOf(status) === -1) {
|
||||
|
||||
@@ -10,6 +10,7 @@ const userKeys = [
|
||||
'log-path',
|
||||
'new-task-show-downloading',
|
||||
'open-at-login',
|
||||
'protocols',
|
||||
'resume-all-when-app-launched',
|
||||
'session-path',
|
||||
'task-notification',
|
||||
|
||||
@@ -4,6 +4,8 @@ export default {
|
||||
'about': 'Über Motrix',
|
||||
'preferences': 'Präferenzen...',
|
||||
'check-for-updates': 'Nach Updates suchen...',
|
||||
'check-updates-now': 'Jetzt prüfen',
|
||||
'checking-for-updates': 'Nach Updates suchen ...',
|
||||
'check-for-updates-title': 'Nach Updates suchen',
|
||||
'update-available-message': 'Eine neue Version von Motrix ist verfügbar, jetzt aktualisieren?',
|
||||
'update-not-available-message': 'Sie sind auf dem neuesten Stand!',
|
||||
|
||||
@@ -37,6 +37,9 @@ export default {
|
||||
'bt-tracker-input-tips': 'Tracker-Server, einer pro Zeile',
|
||||
'bt-tracker-tips': 'Empfehlen:',
|
||||
'sync-tracker-tips': 'Von ngosang/trackerslist synchronisieren',
|
||||
'security': 'Sicherheit',
|
||||
'rpc-secret': 'RPC-Geheimnis',
|
||||
'rpc-secret-tips': 'Geheime RPC-Anleitung anzeigen',
|
||||
'developer': 'Entwickler',
|
||||
'mock-user-agent': 'User-Agent simulieren',
|
||||
'app-log-path': 'Appprotokollpfad',
|
||||
@@ -45,11 +48,14 @@ export default {
|
||||
'factory-reset-confirm': 'Sollen die Einstellungen auf die Werkseinstellungen unwiderruflich zurückgesetzt werden?',
|
||||
'lab-warning': '⚠️ Die Aktivierung von experimentellen Funktionen kann zu App-Abstürzen oder Datenverlust führen!',
|
||||
'download-protocol': 'Protokoll',
|
||||
'support-more-download-protocols': 'Erweiterte Protokollunterstützung aktivieren',
|
||||
'protocols-default-client': 'Als Standardclient für die folgenden Protokolle festlegen',
|
||||
'protocols-magnet': 'Magnet [ magnet:// ]',
|
||||
'protocols-thunder': 'Donner [ thunder:// ]',
|
||||
'browser-extensions': 'Erweiterungen',
|
||||
'baidu-exporter': 'Baidu Exporter',
|
||||
'browser-extensions-tips': 'Von der Community bereitgestellt, ',
|
||||
'baidu-exporter-help': 'mehr über die Verwendung zu erfahren',
|
||||
'auto-update': 'Auto-Update',
|
||||
'auto-check-update': 'Automatische Updates überprüfen',
|
||||
'last-check-update-time': 'letzte kontrolle update - zeit'
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ export default {
|
||||
'about': 'About Motrix',
|
||||
'preferences': 'Preferences...',
|
||||
'check-for-updates': 'Check for Updates...',
|
||||
'check-updates-now': 'Check now',
|
||||
'checking-for-updates': 'Checking for updates ...',
|
||||
'check-for-updates-title': 'Check for Updates',
|
||||
'update-available-message': 'A newer version of Motrix is available, update now?',
|
||||
'update-not-available-message': 'You are up-to-date!',
|
||||
|
||||
@@ -39,7 +39,7 @@ export default {
|
||||
'sync-tracker-tips': 'Sync from ngosang/trackerslist',
|
||||
'security': 'Security',
|
||||
'rpc-secret': 'RPC Secret',
|
||||
'rpc-secret-tips': 'RPC Secret Manual',
|
||||
'rpc-secret-tips': 'View RPC Secret Manual',
|
||||
'developer': 'Developer',
|
||||
'mock-user-agent': 'Mock User-Agent',
|
||||
'app-log-path': 'App log path',
|
||||
@@ -48,11 +48,14 @@ export default {
|
||||
'factory-reset-confirm': 'Are you sure you want to revert to factory settings?',
|
||||
'lab-warning': '⚠️ Enabling lab features may result in app crash or data loss, decide at you own risk!',
|
||||
'download-protocol': 'Protocols',
|
||||
'support-more-download-protocols': 'Enable support for more download protocols',
|
||||
'protocols-default-client': 'Set as the default client for the following protocols',
|
||||
'protocols-magnet': 'Magnet [ magnet:// ]',
|
||||
'protocols-thunder': 'Thunder [ thunder:// ]',
|
||||
'browser-extensions': 'Extensions',
|
||||
'baidu-exporter': 'BaiduExporter',
|
||||
'browser-extensions-tips': 'Provided by the community, ',
|
||||
'baidu-exporter-help': 'Click here for usage',
|
||||
'auto-update': 'Auto Update',
|
||||
'auto-check-update': 'Automatically check for update',
|
||||
'last-check-update-time': 'Last Time Checking for Update'
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ export default {
|
||||
'about': 'درباره ماتریکس',
|
||||
'preferences': 'تنظیمات دلخواه',
|
||||
'check-for-updates': 'چک کردن آپدیت...',
|
||||
'check-updates-now': 'اکنون بررسی کنید',
|
||||
'checking-for-updates': 'بررسی برای به روز رسانی ...',
|
||||
'check-for-updates-title': 'چک کردن آپدیت',
|
||||
'update-available-message': 'نسخهی جدید ماتریکس دردسترس است. آپدیت انجام شود؟',
|
||||
'update-not-available-message': 'شما آخرین نسخه را دارید!',
|
||||
|
||||
@@ -37,6 +37,9 @@ export default {
|
||||
'bt-tracker-input-tips': 'ردیاب سرور، در هر خط',
|
||||
'bt-tracker-tips': 'توصیه:',
|
||||
'sync-tracker-tips': 'داده همگام سازی از ngosang/trackerslist',
|
||||
'security': 'امنیت',
|
||||
'rpc-secret': 'مخفی RPC',
|
||||
'rpc-secret-tips': 'مشاهده RPC راز دفترچه راهنما',
|
||||
'developer': 'توسعهدهنده',
|
||||
'mock-user-agent': 'Mock User-Agent',
|
||||
'app-log-path': 'ادرس لاگ برنامه',
|
||||
@@ -45,11 +48,14 @@ export default {
|
||||
'factory-reset-confirm': 'آیا شما مطمئن هستید؟',
|
||||
'lab-warning': '⚠️ فعالسازی امکانات آزمایشگاه ممکن است باعث کرش برنامه یا از دست دادن دیتا بشود، خودتون تصمیم بگیرین!',
|
||||
'download-protocol': 'پروتکل',
|
||||
'support-more-download-protocols': 'فعالسازی حمایت از پروتکلهای دانلود بیشتر',
|
||||
'protocols-default-client': 'به عنوان مشتری پیش فرض برای پروتکل های زیر تنظیم شده است',
|
||||
'protocols-magnet': 'آهن ربا [ magnet:// ]',
|
||||
'protocols-thunder': 'تندر [ thunder:// ]',
|
||||
'browser-extensions': 'افزونهها',
|
||||
'baidu-exporter': 'BaiduExporter',
|
||||
'browser-extensions-tips': 'تهیه شده توسط انجمن، ',
|
||||
'baidu-exporter-help': 'برای استفاده اینجا کلیک کنید',
|
||||
'auto-update': 'به روز رسانی خودکار',
|
||||
'auto-check-update': 'اتوماتیک برای آپدیت چک کن',
|
||||
'last-check-update-time': 'آخرین باری که برای آپدیت چک شده'
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ export default {
|
||||
'about': 'À Propos de Motrix',
|
||||
'preferences': 'Préférences...',
|
||||
'check-for-updates': 'Vérifier les mises à jour...',
|
||||
'check-updates-now': 'Vérifier maintenant',
|
||||
'checking-for-updates': 'Vérification des mises à jour ...',
|
||||
'check-for-updates-title': 'Vérifier les mises à jour',
|
||||
'update-available-message': 'Une nouvelle version de Motrix est disponible, mise à jour maintenant?',
|
||||
'update-not-available-message': 'Vous êtes à jour!',
|
||||
|
||||
@@ -37,6 +37,9 @@ export default {
|
||||
'bt-tracker-input-tips': 'Serveur de suivi, un par ligne',
|
||||
'bt-tracker-tips': 'Recommander:',
|
||||
'sync-tracker-tips': 'Sync de ngosang/trackerslist',
|
||||
'security': 'Sécurité',
|
||||
'rpc-secret': 'RPC Secret',
|
||||
'rpc-secret-tips': 'Voir le manuel secret RPC',
|
||||
'developer': 'Développeur',
|
||||
'mock-user-agent': 'Mock User-Agent',
|
||||
'app-log-path': 'Chemin des logs',
|
||||
@@ -45,11 +48,14 @@ export default {
|
||||
'factory-reset-confirm': 'Êtes vous sûr de vouloir réinitialiser les paramètres',
|
||||
'lab-warning': '⚠️ Activer les fonctionalités labo peut causer des crash ou la perte de données !',
|
||||
'download-protocol': 'Protocole',
|
||||
'support-more-download-protocols': 'Activer les protocoles de téléchargement suplémentaires',
|
||||
'protocols-default-client': 'Définir comme client par défaut pour les protocoles suivants',
|
||||
'protocols-magnet': 'Aimant [ magnet:// ]',
|
||||
'protocols-thunder': 'Tonnerre [ thunder:// ]',
|
||||
'browser-extensions': 'Extensions',
|
||||
'baidu-exporter': 'BaiduExporter',
|
||||
'browser-extensions-tips': 'Fourni par la communauté, ',
|
||||
'baidu-exporter-help': 'Cliquez ici pour voir l\'utilisation',
|
||||
'auto-update': 'Mettre à jour',
|
||||
'auto-check-update': 'Mise à jour automatique',
|
||||
'last-check-update-time': 'dernier contrôle la mise à jour du temps'
|
||||
}
|
||||
|
||||
@@ -4,6 +4,17 @@ export default {
|
||||
'about': 'Motrix について',
|
||||
'preferences': '環境設定...',
|
||||
'check-for-updates': '更新を確認...',
|
||||
'check-updates-now': '今すぐチェック',
|
||||
'checking-for-updates': 'アップデートをチェックしています...',
|
||||
'check-for-updates-title': 'アップデートをチェック',
|
||||
'update-available-message': '新しいバージョンのMotrixが利用可能です、今すぐ更新しますか?',
|
||||
'update-not-available-message': 'あなたは最新です!',
|
||||
'update-downloaded-message': 'インストールする準備ができています...',
|
||||
'update-error-message': '更新エラー',
|
||||
'engine-damaged-message': 'エンジンが破損しています、再インストールしてください : (',
|
||||
'engine-missing-message': 'エンジンが見つかりません。再インストールしてください : (',
|
||||
'system-error-title': 'システムエラー',
|
||||
'system-error-message': 'アプリケーションの起動に失敗しました:{{message}}',
|
||||
'hide': 'Motrix を隠す',
|
||||
'hide-others': 'ほかを隠す',
|
||||
'unhide': 'すべてを表示',
|
||||
|
||||
@@ -37,6 +37,9 @@ export default {
|
||||
'bt-tracker-input-tips': 'トラッカーサーバ、一行に一つ',
|
||||
'bt-tracker-tips': 'お勧め:',
|
||||
'sync-tracker-tips': 'ngosang/trackerslist からの同期',
|
||||
'security': 'セキュリティ',
|
||||
'rpc-secret': 'RPCシークレット',
|
||||
'rpc-secret-tips': 'RPCシークレットマニュアルの閲覧',
|
||||
'developer': '開発者',
|
||||
'mock-user-agent': '偽装ユーザーエージェント(UA)',
|
||||
'app-log-path': 'ログディレクトリを適用',
|
||||
@@ -45,11 +48,14 @@ export default {
|
||||
'factory-reset-confirm': '本当に初期設定に戻しますか?',
|
||||
'lab-warning': '⚠️ベータ機能をオンにするとアプリケーションの強制終了やデータが損失する可能性があります。自己責任でお願いします。',
|
||||
'download-protocol': 'プロトコル',
|
||||
'support-more-download-protocols': 'より多くのプロトコルを適用',
|
||||
'protocols-default-client': '以下のプロトコルのデフォルトクライアントとして設定',
|
||||
'protocols-magnet': '磁石 [ magnet:// ]',
|
||||
'protocols-thunder': 'サンダー [ thunder:// ]',
|
||||
'browser-extensions': 'ブラウザ拡張機能',
|
||||
'baidu-exporter': 'バイドゥオンラインストレージ拡張機能',
|
||||
'browser-extensions-tips': '他のユーザによって作成されたものです。動作は保証できません。',
|
||||
'baidu-exporter-help': 'ここをクリックし使用説明を見る',
|
||||
'auto-update': '自動更新',
|
||||
'auto-check-update': '更新を自動で確認する',
|
||||
'last-check-update-time': '前回更新確認時間'
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ export default {
|
||||
'about': 'Motrix 정보',
|
||||
'preferences': '설정...',
|
||||
'check-for-updates': '업데이트 확인...',
|
||||
'check-updates-now': '지금 확인',
|
||||
'checking-for-updates': '업데이트 확인 중 ...',
|
||||
'check-for-updates-title': '업데이트 확인',
|
||||
'update-available-message': '새 버전의 Motrix를 사용할 수 있습니다, 지금 업데이트 하시겠습니까?',
|
||||
'update-not-available-message': '최신 버전을 사용 중입니다!',
|
||||
|
||||
@@ -37,6 +37,9 @@ export default {
|
||||
'bt-tracker-input-tips': '트래커 서버, 한 줄에 하나씩',
|
||||
'bt-tracker-tips': '추천 :',
|
||||
'sync-tracker-tips': 'ngosang/trackerslist에서 동기화',
|
||||
'security': '보안',
|
||||
'rpc-secret': 'RPC 비밀',
|
||||
'rpc-secret-tips': 'RPC 비밀 매뉴얼보기',
|
||||
'developer': '개발자',
|
||||
'mock-user-agent': '사용자 에이전트 흉내',
|
||||
'app-log-path': '앱 로그 경로',
|
||||
@@ -45,11 +48,14 @@ export default {
|
||||
'factory-reset-confirm': '초기 설정으로 되돌리시겠습니까?',
|
||||
'lab-warning': '⚠️ 실험실 기능을 활성화하면 앱 충돌이나 데이터 손실을 초래할 수 있으므로 직접 결정하십시오!',
|
||||
'download-protocol': '프로토콜',
|
||||
'support-more-download-protocols': '더 많은 다운로드 프로토콜 지원 허용',
|
||||
'protocols-default-client': '다음 프로토콜의 기본 클라이언트로 설정',
|
||||
'protocols-magnet': '자석 [ magnet:// ]',
|
||||
'protocols-thunder': '우뢰 [ thunder:// ]',
|
||||
'browser-extensions': '확장 프로그램',
|
||||
'baidu-exporter': 'BaiduExporter',
|
||||
'browser-extensions-tips': '커뮤니티에서 제공하는, ',
|
||||
'baidu-exporter-help': '사용법을 보려면 여기를 클릭하십시오.',
|
||||
'auto-update': '자동 업데이트',
|
||||
'auto-check-update': '업데이트 자동 확인',
|
||||
'last-check-update-time': '마지막 업데이트 확인 시간'
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ export default {
|
||||
'about': 'Sobre o Motrix',
|
||||
'preferences': 'Preferências...',
|
||||
'check-for-updates': 'Verificar por Atualizações...',
|
||||
'check-updates-now': 'Verificar agora',
|
||||
'checking-for-updates': 'Verificar atualizações ...',
|
||||
'check-for-updates-title': 'Verificar por Atualizações',
|
||||
'update-available-message': 'Uma nova versão do Motrix está disponível, atualize agora?',
|
||||
'update-not-available-message': 'Você esta atualizado!',
|
||||
|
||||
@@ -37,6 +37,9 @@ export default {
|
||||
'bt-tracker-input-tips': 'servidor rastreador, um por linha',
|
||||
'bt-tracker-tips': 'Recomendar:',
|
||||
'sync-tracker-tips': 'Sincronizar dados de ngosang/trackerslist',
|
||||
'security': 'Segurança',
|
||||
'rpc-secret': 'Segredo de RPC',
|
||||
'rpc-secret-tips': 'Veja o manual secreto de RPC',
|
||||
'developer': 'Desenvolverdor',
|
||||
'mock-user-agent': 'Mock User-Agent',
|
||||
'app-log-path': 'Diretório de logs',
|
||||
@@ -45,11 +48,14 @@ export default {
|
||||
'factory-reset-confirm': 'Você tem certeza de que deseja resetar às configurações de fábrica?',
|
||||
'lab-warning': '⚠️ Habilitar os recursos de lab pode causar perda de dados e fechar o app inesperadamete. Use por sua conta e risco!',
|
||||
'download-protocol': 'Protocolo',
|
||||
'support-more-download-protocols': 'Habilitar suporte a mais protocolos de download',
|
||||
'protocols-default-client': 'Definir como cliente padrão para os seguintes protocolos',
|
||||
'protocols-magnet': 'Magnético [ magnet:// ]',
|
||||
'protocols-thunder': 'Trovão [ thunder:// ]',
|
||||
'browser-extensions': 'Extensões',
|
||||
'baidu-exporter': 'BaiduExporter',
|
||||
'browser-extensions-tips': 'Fornecido pela comunidade, ',
|
||||
'baidu-exporter-help': 'Clique aqui ver as instruções de uso',
|
||||
'auto-update': 'Atualização automática',
|
||||
'auto-check-update': 'A verificação automática de atualizações',
|
||||
'last-check-update-time': 'última verificação do tempo de atualização'
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ export default {
|
||||
'about': 'Motrix Hakkında',
|
||||
'preferences': 'Ayarlar...',
|
||||
'check-for-updates': 'Güncellemeleri kontrol et...',
|
||||
'check-updates-now': 'Şimdi kontrol et',
|
||||
'checking-for-updates': 'Güncellemeleri kontrol ediyor ...',
|
||||
'check-for-updates-title': 'Güncellemeleri kontrol et',
|
||||
'update-available-message': 'Motrix\'in yeni bir sürümü var, şimdi güncelle?',
|
||||
'update-not-available-message': 'Gündemdesin!',
|
||||
|
||||
@@ -37,6 +37,9 @@ export default {
|
||||
'bt-tracker-input-tips': 'İzleyici sunucusu, her satıra bir tane',
|
||||
'bt-tracker-tips': 'Tavsiye et:',
|
||||
'sync-tracker-tips': 'ngosang/trackerslist\'dan verileri senkronize et',
|
||||
'security': 'Güvenlik',
|
||||
'rpc-secret': 'RPC sırrı',
|
||||
'rpc-secret-tips': 'RPC gizli kılavuzunu görüntüle',
|
||||
'developer': 'Geliştirici',
|
||||
'mock-user-agent': 'Sahte Kullanıcı Kimliği (User-Agent)',
|
||||
'app-log-path': 'Uygulama log yolu',
|
||||
@@ -45,11 +48,14 @@ export default {
|
||||
'factory-reset-confirm': 'Fabrika ayarlarına geri dönmek istediğinize emin misiniz?',
|
||||
'lab-warning': '⚠️ Deneysel özellikleri etkinleştirmek uygulamanın çökmesine veya veri kaybına neden olabilir, kendiniz karar verin!',
|
||||
'download-protocol': 'Protokol',
|
||||
'support-more-download-protocols': 'Daha fazla indirme protokolü desteğini etkinleştir',
|
||||
'protocols-default-client': 'Aşağıdaki protokoller için varsayılan istemci olarak ayarla',
|
||||
'protocols-magnet': 'Mıknatıs [ magnet:// ]',
|
||||
'protocols-thunder': 'gök gürültüsü [ thunder:// ]',
|
||||
'browser-extensions': 'Eklentiler',
|
||||
'baidu-exporter': 'BaiduExporter',
|
||||
'browser-extensions-tips': 'Topluluk tarafından sağlanan, ',
|
||||
'baidu-exporter-help': 'Kullanım detayları için buraya tıklayın',
|
||||
'auto-update': 'Otomatik güncelleme',
|
||||
'auto-check-update': 'Otomatik Kontrol Güncellemesi',
|
||||
'last-check-update-time': 'Son Kontrol Güncelleme Saati'
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ export default {
|
||||
'about': '关于 Motrix',
|
||||
'preferences': '偏好设置...',
|
||||
'check-for-updates': '检查更新...',
|
||||
'check-updates-now': '立即检查',
|
||||
'checking-for-updates': '正在检查更新...',
|
||||
'check-for-updates-title': '检查更新',
|
||||
'update-available-message': '发现新版本,是否现在更新?',
|
||||
'update-not-available-message': '已是最新版',
|
||||
|
||||
@@ -37,6 +37,9 @@ export default {
|
||||
'bt-tracker-input-tips': 'Tracker 服务器,一行一个',
|
||||
'bt-tracker-tips': '推荐使用:',
|
||||
'sync-tracker-tips': '从 ngosang/trackerslist 同步',
|
||||
'security': '安全性',
|
||||
'rpc-secret': 'RPC 授权密钥',
|
||||
'rpc-secret-tips': '查看说明文档',
|
||||
'developer': '开发者',
|
||||
'mock-user-agent': '模拟用户代理(UA)',
|
||||
'app-log-path': '应用日志路径',
|
||||
@@ -45,11 +48,14 @@ export default {
|
||||
'factory-reset-confirm': '你确定要恢复为初始设置吗?',
|
||||
'lab-warning': '⚠️启用实验特性可能造成应用崩溃或数据丢失,请自行决定!',
|
||||
'download-protocol': '下载协议',
|
||||
'support-more-download-protocols': '支持更多下载协议',
|
||||
'protocols-default-client': '设置为以下协议的默认客户端',
|
||||
'protocols-magnet': '磁力链接 [ magnet:// ]',
|
||||
'protocols-thunder': '迅雷链接 [ thunder:// ]',
|
||||
'browser-extensions': '浏览器扩展',
|
||||
'baidu-exporter': '百度网盘助手',
|
||||
'browser-extensions-tips': '社区提供的浏览器扩展「不保证可用性」,',
|
||||
'baidu-exporter-help': '点此查看使用说明',
|
||||
'auto-update': '自动更新',
|
||||
'auto-check-update': '自动检查更新',
|
||||
'last-check-update-time': '上次检查更新时间'
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ export default {
|
||||
'about': '關於 Motrix',
|
||||
'preferences': '偏好設定...',
|
||||
'check-for-updates': '檢查更新...',
|
||||
'check-updates-now': '立即檢查',
|
||||
'checking-for-updates': '正在檢查更新...',
|
||||
'check-for-updates-title': '檢查更新',
|
||||
'update-available-message': '發現新版本,是否現在更新?',
|
||||
'update-not-available-message': '已是最新版',
|
||||
|
||||
@@ -37,6 +37,9 @@ export default {
|
||||
'bt-tracker-input-tips': 'Tracker 伺服器,一行一個',
|
||||
'bt-tracker-tips': '推薦使用:',
|
||||
'sync-tracker-tips': '從 ngosang/trackerslist 同步',
|
||||
'security': '安全性',
|
||||
'rpc-secret': 'RPC 授權密鑰',
|
||||
'rpc-secret-tips': '查看说明手冊',
|
||||
'developer': '開發者',
|
||||
'mock-user-agent': '模擬使用者代理(UA)',
|
||||
'app-log-path': '應用程式記錄檔位置',
|
||||
@@ -45,11 +48,14 @@ export default {
|
||||
'factory-reset-confirm': '您確定要還原為出廠預設值嗎?',
|
||||
'lab-warning': '⚠️開啟實驗性功能可能會造成程式當機或資料遺失,請自己決定!',
|
||||
'download-protocol': '下載協定',
|
||||
'support-more-download-protocols': '支援更多下載協定',
|
||||
'protocols-default-client': '設置為以下協議的默認客戶端',
|
||||
'protocols-magnet': '磁力連結 [ magnet:// ]',
|
||||
'protocols-thunder': '迅雷連結 [ thunder:// ]',
|
||||
'browser-extensions': '瀏覽器擴充功能',
|
||||
'baidu-exporter': '百度網盤助手',
|
||||
'browser-extensions-tips': '社群提供的瀏覽器擴充功能「不保證可用性」,',
|
||||
'baidu-exporter-help': '點此檢視使用說明',
|
||||
'auto-update': '自動更新',
|
||||
'auto-check-update': '自動檢查更新',
|
||||
'last-check-update-time': '上次檢查更新時間'
|
||||
}
|
||||
|
||||
+22
-1
@@ -181,7 +181,7 @@ export function isMagnetTask (task) {
|
||||
|
||||
export function checkTaskIsSeeder (task) {
|
||||
const { bittorrent, seeder } = task
|
||||
return !!bittorrent && seeder
|
||||
return !!bittorrent && seeder === 'true'
|
||||
}
|
||||
|
||||
export function getTaskUri (task, btTracker = []) {
|
||||
@@ -550,3 +550,24 @@ export function parseHeader (header = '') {
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
export function formatOptionsForEngine (options) {
|
||||
const result = {}
|
||||
|
||||
Object.keys(options).forEach((key) => {
|
||||
result[key] = `${options[key]}`
|
||||
})
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
export function buildRpcUrl (options) {
|
||||
const { port, secret } = options
|
||||
let result = `127.0.0.1:${port}/jsonrpc`
|
||||
if (secret) {
|
||||
result = `token:${secret}@${result}`
|
||||
}
|
||||
result = `http://${result}`
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user