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",
|
"program": "${workspaceFolder}/player.js",
|
||||||
"args":["url", "https://open.spotify.com/album/0sHibspyMdqOB4RsaCsG8X"]
|
"args":["url", "https://open.spotify.com/album/0sHibspyMdqOB4RsaCsG8X"]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"name": "Player Pause",
|
||||||
|
"skipFiles": [
|
||||||
|
],
|
||||||
|
"program": "${workspaceFolder}/player.js",
|
||||||
|
"args":["pause"]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "node",
|
"type": "node",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
|
@ -103,10 +103,8 @@ async function playFile() {
|
|||||||
let body;
|
let body;
|
||||||
try {
|
try {
|
||||||
if (lastPlayer.includes(album)) {
|
if (lastPlayer.includes(album)) {
|
||||||
console.log('same disk')
|
|
||||||
body = {}
|
body = {}
|
||||||
} else {
|
} else {
|
||||||
console.log('different disk')
|
|
||||||
body = {
|
body = {
|
||||||
"context_uri": album,
|
"context_uri": album,
|
||||||
"offset": {
|
"offset": {
|
||||||
@ -132,12 +130,10 @@ async function playFile() {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log('something went wrong')
|
|
||||||
throw Error(`Request error: ${e}`);
|
throw Error(`Request error: ${e}`);
|
||||||
}
|
}
|
||||||
this.response = response;
|
this.response = response;
|
||||||
this.response.body = response.body
|
this.response.body = response.body
|
||||||
console.log('all good')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function playURL() {
|
async function playURL() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user