From d6bf3678f48111d331b7615b198fab5d513fbd54 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Sat, 3 Jul 2021 11:10:07 +0200 Subject: [PATCH] Re-added paste-in functionality for newline separated link lists Library patch update --- package.json | 2 +- server/dist/routes/api/post/addToQueue.js | 2 +- server/src/routes/api/post/addToQueue.ts | 2 +- yarn.lock | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 138294d..7794826 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "electron-window-state-manager": "^0.3.2", "cookie-parser": "1.4.5", "debug": "2.6.9", - "deemix": "3.0.1", + "deemix": "3.0.2", "deezer-js": "1.0.0", "dotenv": "8.2.0", "express": "4.17.1", diff --git a/server/dist/routes/api/post/addToQueue.js b/server/dist/routes/api/post/addToQueue.js index 05ac775..3672ac6 100644 --- a/server/dist/routes/api/post/addToQueue.js +++ b/server/dist/routes/api/post/addToQueue.js @@ -17,7 +17,7 @@ const handler = (req, res) => __awaiter(void 0, void 0, void 0, function* () { if (!main_1.sessionDZ[req.session.id]) main_1.sessionDZ[req.session.id] = new deezer_js_1.Deezer(); const dz = main_1.sessionDZ[req.session.id]; - const url = req.query.url.split(';'); + const url = req.query.url.split(/[\s;]+/); let bitrate = req.query.bitrate; if (bitrate === 'null') bitrate = main_1.getSettings().settings.maxBitrate; diff --git a/server/src/routes/api/post/addToQueue.ts b/server/src/routes/api/post/addToQueue.ts index 372920d..a5ed448 100644 --- a/server/src/routes/api/post/addToQueue.ts +++ b/server/src/routes/api/post/addToQueue.ts @@ -9,7 +9,7 @@ const handler: ApiHandler['handler'] = async (req, res) => { if (!sessionDZ[req.session.id]) sessionDZ[req.session.id] = new Deezer() const dz = sessionDZ[req.session.id] - const url = req.query.url.split(';') + const url = req.query.url.split(/[\s;]+/) let bitrate = req.query.bitrate if (bitrate === 'null') bitrate = getSettings().settings.maxBitrate let obj: any diff --git a/yarn.lock b/yarn.lock index f4e7a0b..258e2ed 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2332,10 +2332,10 @@ decompress-response@^6.0.0: dependencies: mimic-response "^3.1.0" -deemix@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/deemix/-/deemix-3.0.1.tgz#692f14b799000516d1b91fa768c145978bbe1b5e" - integrity sha512-wxI3aRs2NELf7U/bEEd0MMJkKxqEt5Y+U5B3xNjHp3hzmq6BTt5C50q8qBL7hE6vaytkG/P4HX7oFJmJVoYyUw== +deemix@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/deemix/-/deemix-3.0.2.tgz#4e975ea7059b0c6202ab4cf681b57a8a14db5378" + integrity sha512-57fWOKq2uMDI4UUge2N5y2Gqlc0nvtM+Bzg85L1k1ic8pmoJtpGtVAi9Cqj+XlhMS4jvNCmOj4ZHzKIsM+F6pA== dependencies: async "^3.2.0" crypto "^1.0.1"