Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

unblock-netease-music

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unblock-netease-music - npm Package Compare versions

Comparing version 2.2.4 to 2.2.5

17

dist/modules/config/index.js

@@ -11,2 +11,6 @@ 'use strict';

var _pkginfo = require('pkginfo');
var _pkginfo2 = _interopRequireDefault(_pkginfo);
require('colors');

@@ -16,4 +20,6 @@

_commander2.default.option('-p, --port <port>', 'Specific server port.').option('-f, --force-ip <ip>', 'Force the netease server ip.').option('-k, --kugou', 'Find copyright music on Kugou.').option('-q, --qq', 'Find copyright music on QQ Music.').option('-r, --rewrite-url', 'Rewrite music download url, let client download file through proxy.').parse(process.argv);
(0, _pkginfo2.default)(module);
_commander2.default.version(module.exports.version).option('-p, --port <port>', 'Specific server port.').option('-f, --force-ip <ip>', 'Force the netease server ip.').option('-r, --rewrite-url', 'Rewrite music download url, let client download file through proxy.').parse(process.argv);
if (_commander2.default.port && (_commander2.default.port < 1 || _commander2.default.port > 65535)) {

@@ -31,12 +37,3 @@ console.log('Port must be higher than 0 and lower than 65535.'.red);

}
if (_commander2.default.kugou) {
console.log('Finding copyright music on Kugou.'.green);
}
if (_commander2.default.qq) {
console.log('Finding copyright music on QQ Music.'.green);
}
if (!_commander2.default.kugou && !_commander2.default.qq) {
console.log('Proxy will do nothing with copyright music.'.yellow);
}
exports.default = _commander2.default;

@@ -53,2 +53,10 @@ 'use strict';

case 3:
if (Object.prototype.hasOwnProperty.call(data.data[0], 'code')) {
_context.next = 5;
break;
}
return _context.abrupt('return', next());
case 5:
playbackReturnCode = data.data[0].code;

@@ -58,3 +66,3 @@ songId = data.data[0].id;

if (!(playbackReturnCode === 200)) {
_context.next = 8;
_context.next = 10;
break;

@@ -66,19 +74,19 @@ }

case 8:
case 10:
urlInfo = void 0;
_context.prev = 9;
_context.next = 12;
_context.prev = 11;
_context.next = 14;
return utils.getUrlInfo(songId);
case 12:
case 14:
urlInfo = _context.sent;
_context.next = 18;
_context.next = 20;
break;
case 15:
_context.prev = 15;
_context.t0 = _context['catch'](9);
case 17:
_context.prev = 17;
_context.t0 = _context['catch'](11);
return _context.abrupt('return', console.log(_context.t0));
case 18:
case 20:
if (urlInfo) {

@@ -92,3 +100,3 @@ data.data[0] = _netease2.default.modifyPlayerApiCustom(urlInfo, data.data[0]);

case 21:
case 23:
case 'end':

@@ -98,3 +106,3 @@ return _context.stop();

}
}, _callee, undefined, [[9, 15]]);
}, _callee, undefined, [[11, 17]]);
}));

@@ -101,0 +109,0 @@

@@ -96,7 +96,7 @@ 'use strict';

if (!(searchResult.length > 0)) {
_context.next = 10;
_context.next = 9;
break;
}
console.log(searchResult);
// console.log(searchResult);
searchName = searchResult[0].name.replace(/ /g, '').toLowerCase();

@@ -106,3 +106,3 @@ trueName = songName.replace(/ /g, '').toLowerCase();

if (!(searchName.indexOf(trueName) !== -1)) {
_context.next = 10;
_context.next = 9;
break;

@@ -116,7 +116,7 @@ }

case 10:
case 9:
console.log(('No resource found from ' + plugin.name).yellow);
callback(null);
case 12:
case 11:
case 'end':

@@ -123,0 +123,0 @@ return _context.stop();

{
"name": "unblock-netease-music",
"version": "2.2.4",
"version": "2.2.5",
"scripts": {

@@ -20,2 +20,3 @@ "start": "babel-node -- src/bin/unblockneteasemusic -p 8123 -k -q -r",

"md5": "^2.1.0",
"pkginfo": "^0.4.0",
"raw-body": "^2.1.6",

@@ -22,0 +23,0 @@ "request": "^2.69.0",

import program from 'commander';
import pkginfo from 'pkginfo';
import 'colors';
pkginfo(module);
program
.version(module.exports.version)
.option('-p, --port <port>', 'Specific server port.')
.option('-f, --force-ip <ip>', 'Force the netease server ip.')
.option('-k, --kugou', 'Find copyright music on Kugou.')
.option('-q, --qq', 'Find copyright music on QQ Music.')
.option('-r, --rewrite-url', 'Rewrite music download url, let client download file through proxy.')

@@ -24,12 +26,3 @@ .parse(process.argv);

}
if (program.kugou) {
console.log('Finding copyright music on Kugou.'.green);
}
if (program.qq) {
console.log('Finding copyright music on QQ Music.'.green);
}
if (!program.kugou && !program.qq) {
console.log('Proxy will do nothing with copyright music.'.yellow);
}
export default program;

@@ -14,5 +14,9 @@ import 'colors';

}
if (!Object.prototype.hasOwnProperty.call(data.data[0], 'code')) {
return next();
}
const playbackReturnCode = data.data[0].code;
const songId = data.data[0].id;
if (playbackReturnCode === 200) {

@@ -19,0 +23,0 @@ console.log('The song URL is '.green + data.data[0].url);

@@ -32,3 +32,3 @@ import 'colors';

if (searchResult.length > 0) {
console.log(searchResult);
// console.log(searchResult);
const searchName = searchResult[0].name.replace(/ /g, '').toLowerCase();

@@ -35,0 +35,0 @@ const trueName = songName.replace(/ /g, '').toLowerCase();

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc