Skip to content

Commit

Permalink
cache detail
Browse files Browse the repository at this point in the history
  • Loading branch information
nondanee committed Jan 25, 2019
1 parent a4590de commit bde1c9f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const ticket = require('./provider/qq').ticket

require('http').createServer().on('request', (req, res) => {
if(req.url == '/qq/ticket')
cache(ticket, 'vkey', 30 * 60 * 1000).then(vkey => res.end(vkey))
cache(ticket, null, 15 * 60 * 1000).then(vkey => res.end(vkey))
else
res.end()
}).listen(parseInt(process.argv[2]) || 9000)
2 changes: 1 addition & 1 deletion provider/qq.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const ticket = () => {
}

const track = id => {
return cache(ticket, 'vkey')
return cache(ticket)
.then(vkey => {
let host = ['streamoc.music.tc.qq.com', 'isure.stream.qqmusic.qq.com', 'dl.stream.qqmusic.qq.com'][0]
// let songUrl =
Expand Down
2 changes: 1 addition & 1 deletion provider/xiami.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const token = () => {
}

const search = info => {
return cache(token, 'token')
return cache(token)
.then(cookie => {
const query = JSON.stringify({key: info.keyword, pagingVO: {page: 1, pageSize: 60}})
const message = cookie['xm_sg_tk'].split('_')[0] + '_xmMain_/api/search/searchSongs_' + query
Expand Down

0 comments on commit bde1c9f

Please sign in to comment.