Presences icon indicating copy to clipboard operation
Presences copied to clipboard

feat(Musixmatch): presence rewrite

Open xKubuuus opened this issue 2 years ago • 6 comments

Description

Musixmatch presence rewrite: add support for curators.musixmatch.com (curators missions and lyrics editor), dynamic covers in presence (/artist and /lyrics) and more

Acknowledgements

Screenshots

Proof showing the creation/modification is working as expected

image

image

image

image

image

image

image

image

image

image

image

xKubuuus avatar Aug 05 '22 19:08 xKubuuus

One question, @NMW03 can I change main author to my discord id/name and add you as contributor?

xKubuuus avatar Aug 05 '22 19:08 xKubuuus

Maybe you can replace if/else if statements by a switch/case statement, it could increase the readability of the code by avoiding a repetition of path.includes("...")

@RisingSunLight42 you mean

switch (true) {
   case path.includes(...): ...
}

?

xKubuuus avatar Aug 06 '22 09:08 xKubuuus

Maybe you can replace if/else if statements by a switch/case statement, it could increase the readability of the code by avoiding a repetition of path.includes("...")

@RisingSunLight42 you mean

switch (true) {
   case path.includes(...): ...
}

?

No Something more like :

switch(path.split("/")[index]) {
   case "home":
... 
}
...

Usually, the first if/else statement can be easily replaced by a switch since in the url it's almost always domain.com/thePageTested/somethingOther

So if you split it, you can test the string thePageTested in a switch that is equal to path.includes("test")

RisingSunLight42 avatar Aug 06 '22 09:08 RisingSunLight42

Maybe you can replace if/else if statements by a switch/case statement, it could increase the readability of the code by avoiding a repetition of path.includes("...")

@RisingSunLight42 you mean

switch (true) {
   case path.includes(...): ...
}

?

No Something more like :

switch(path.split("/")[index]) {
   case "home":
... 
}
...

Usually, the first if/else statement can be easily replaced by a switch since in the url it's almost always domain.com/thePageTested/somethingOther

So if you split it, you can test the string thePageTested in a switch that is equal to path.includes("test")

If you're still confused I implemented it in #6610

DarkVillager avatar Aug 06 '22 12:08 DarkVillager

i can add this switch and change more selectors, but later

xKubuuus avatar Aug 08 '22 09:08 xKubuuus

👋 @xKubsoneQ Don't forget to be active and apply changes for example, after one week without any updates, PR can be closed if there's no legitimate reason.

RisingSunLight42 avatar Aug 11 '22 23:08 RisingSunLight42