A full-featured download manager.
fix: magnet and thunder protocol handle
Dr_rOot98df9c3f2aaf
diff --git a/src/main/core/ProtocolManager.js b/src/main/core/ProtocolManager.jsindex d0a5e221..58a9a44c 100644--- a/src/main/core/ProtocolManager.js+++ b/src/main/core/ProtocolManager.js@@ -41,7 +41,12 @@ export default class ProtocolManager extends EventEmitter {handle (url) {logger.info(`[Motrix] protocol url: ${url}`)- this.handleMagnetAndThunderProtocol(url)+ if (+ url.toLowerCase().startsWith('magnet:') ||+ url.toLowerCase().startsWith('thunder:')+ ) {+ return this.handleMagnetAndThunderProtocol(url)+ }if (url.toLowerCase().startsWith('mo:') ||@@ -55,17 +60,6 @@ export default class ProtocolManager extends EventEmitter {if (!url) {return}- 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)}