all working
This commit is contained in:
parent
5861f6bf05
commit
2ed2207f46
9
.vscode/launch.json
vendored
9
.vscode/launch.json
vendored
@ -31,6 +31,15 @@
|
||||
"program": "${workspaceFolder}/player.js",
|
||||
"args":["url", "https://open.spotify.com/album/0sHibspyMdqOB4RsaCsG8X"]
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Player Pause",
|
||||
"skipFiles": [
|
||||
],
|
||||
"program": "${workspaceFolder}/player.js",
|
||||
"args":["pause"]
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
|
@ -103,10 +103,8 @@ async function playFile() {
|
||||
let body;
|
||||
try {
|
||||
if (lastPlayer.includes(album)) {
|
||||
console.log('same disk')
|
||||
body = {}
|
||||
} else {
|
||||
console.log('different disk')
|
||||
body = {
|
||||
"context_uri": album,
|
||||
"offset": {
|
||||
@ -132,12 +130,10 @@ async function playFile() {
|
||||
},
|
||||
});
|
||||
} catch (e) {
|
||||
console.log('something went wrong')
|
||||
throw Error(`Request error: ${e}`);
|
||||
}
|
||||
this.response = response;
|
||||
this.response.body = response.body
|
||||
console.log('all good')
|
||||
}
|
||||
|
||||
async function playURL() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user