From a348fa15303df2682cccdc395641a05f3608014f Mon Sep 17 00:00:00 2001 From: SeMiD Date: Thu, 9 Nov 2023 21:33:01 +0000 Subject: [PATCH] chore(Deezer): refactor (#7734) chore: update assets Signed-off-by: SeMiD --- websites/D/Deezer/metadata.json | 9 ++++++--- websites/D/Deezer/presence.ts | 14 ++++++-------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/websites/D/Deezer/metadata.json b/websites/D/Deezer/metadata.json index b2dfefa32bb7..8ae03fa1ed50 100644 --- a/websites/D/Deezer/metadata.json +++ b/websites/D/Deezer/metadata.json @@ -23,12 +23,15 @@ "ga_IE": "Éifeall na ceimhniú a thágthóg, uair éirinn." }, "url": "www.deezer.com", - "version": "2.3.0", + "version": "2.3.1", "logo": "https://cdn.rcd.gg/PreMiD/websites/D/Deezer/assets/logo.png", "thumbnail": "https://cdn.rcd.gg/PreMiD/websites/D/Deezer/assets/thumbnail.png", "color": "#A31D7C", "category": "music", - "tags": ["radio", "music"], + "tags": [ + "radio", + "music" + ], "settings": [ { "id": "lang", @@ -53,4 +56,4 @@ "value": false } ] -} +} \ No newline at end of file diff --git a/websites/D/Deezer/presence.ts b/websites/D/Deezer/presence.ts index f8382dca4908..e94d85a70eae 100644 --- a/websites/D/Deezer/presence.ts +++ b/websites/D/Deezer/presence.ts @@ -101,15 +101,13 @@ presence.on("UpdateData", async () => { artistLink = document .querySelector('[data-testid="item_subtitle"] > a') ?.getAttribute("href"), - currentTime = document.querySelector( - '[data-testid="elapsed_time"]' - ).textContent, - duration = document.querySelector( - '[data-testid="remaining_time"]' - ).textContent, timestamps = presence.getTimestamps( - presence.timestampFromFormat(currentTime), - presence.timestampFromFormat(duration) + presence.timestampFromFormat( + document.querySelector('[data-testid="elapsed_time"]').textContent + ), + presence.timestampFromFormat( + document.querySelector('[data-testid="remaining_time"]').textContent + ) ); if (document.querySelector('[data-testid="play_button_play"]')) paused = true;