Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions websites/D/Deezer/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"url": "www.deezer.com",
"regExp": "^https?[:][/][/](www[.])?deezer[.]com[/]",
"version": "2.4.1",
"version": "2.4.2",
"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": "#a238ff",
Expand Down Expand Up @@ -57,7 +57,12 @@
"icon": "fad fa-user-large",
"value": true
},

{
"id": "hidePaused",
"title": "Hide Paused",
"icon": "fad fa-pause-circle",
"value": false
},
{
"id": "showBrowsing",
"title": "Show Browsing Info",
Expand Down
6 changes: 5 additions & 1 deletion websites/D/Deezer/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ presence.on('UpdateData', async () => {
let strings = await getStrings()
let paused = false

const [buttons, newLang, cover, browseInfo, artistAsTitle, showBrowsing] = await Promise.all([
const [buttons, newLang, cover, browseInfo, artistAsTitle, showBrowsing, hidePaused] = await Promise.all([
presence.getSetting<boolean>('buttons'),
presence.getSetting<string>('lang').catch(() => 'en'),
presence.getSetting<boolean>('cover'),
presence.getSetting<boolean>('browseInfo'),
presence.getSetting<boolean>('artistAsTitle'),
presence.getSetting<boolean>('showBrowsing'),
presence.getSetting<boolean>('hidePaused'),
])
const { pathname, hostname } = document.location
const remainingTest = document.querySelector(
Expand Down Expand Up @@ -122,6 +123,9 @@ presence.on('UpdateData', async () => {
if (document.querySelector('[data-testid="play_button_play"]'))
paused = true

if (hidePaused && paused)
return presence.clearActivity()

presenceData.details = document.querySelector(
'[data-testid="item_title"]',
)?.textContent
Expand Down
Loading