Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.

Commit

Permalink
build & bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
ITJesse committed Sep 4, 2017
1 parent 78e477c commit 0db8c49
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 10 deletions.
29 changes: 20 additions & 9 deletions dist/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ var _modify = require('./modules/modify');

var modify = _interopRequireWildcard(_modify);

var _netease = require('./modules/utils/netease');

var _netease2 = _interopRequireDefault(_netease);

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
Expand Down Expand Up @@ -70,32 +74,39 @@ app.use(function () {
return _context.abrupt('return');

case 11:
_context.prev = 11;
if (Array.isArray(json.data)) {
json.data = json.data.map(function (e) {
return _netease2.default.fixJsonData(e);
});
} else {
json.data = _netease2.default.fixJsonData(json.data);
}
_context.prev = 12;

ctx.body = json;
_context.next = 15;
_context.next = 16;
return next();

case 15:
_context.next = 22;
case 16:
_context.next = 23;
break;

case 17:
_context.prev = 17;
_context.t1 = _context['catch'](11);
case 18:
_context.prev = 18;
_context.t1 = _context['catch'](12);

if (_config2.default.verbose) {
console.log(_context.t1);
}
ctx.body = json;
console.log('Modify failed.'.red);

case 22:
case 23:
case 'end':
return _context.stop();
}
}
}, _callee, undefined, [[2, 6], [11, 17]]);
}, _callee, undefined, [[2, 6], [12, 18]]);
}));

return function (_x, _x2) {
Expand Down
14 changes: 14 additions & 0 deletions dist/modules/utils/netease/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ var _getIterator2 = require('babel-runtime/core-js/get-iterator');

var _getIterator3 = _interopRequireDefault(_getIterator2);

var _assign = require('babel-runtime/core-js/object/assign');

var _assign2 = _interopRequireDefault(_assign);

var _promise = require('babel-runtime/core-js/promise');

var _promise2 = _interopRequireDefault(_promise);
Expand Down Expand Up @@ -176,6 +180,16 @@ var Netease = function () {
});
});
}
}, {
key: 'fixJsonData',
value: function fixJsonData(body) {
return (0, _assign2.default)({}, body, {
url: null,
type: null,
md5: null,
uf: null
});
}
}, {
key: 'modifyPlayerApiCustom',
value: function () {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "unblock-netease-music",
"version": "2.5.4",
"version": "2.5.5",
"scripts": {
"start": "babel-node -- src/bin/unblockneteasemusic -p 8123 -v",
"build": "rm -rf dist && babel src --out-dir dist"
Expand Down

0 comments on commit 0db8c49

Please sign in to comment.