TheQwertiest / foo_discord_rich

foobar2000 component for integration with Discord Rich Presence
https://theqwertiest.github.io/foo_discord_rich/
MIT License
405 stars 40 forks source link

Fall back to song artist if album artist not available #24

Closed dninemfive closed 3 years ago

dninemfive commented 3 years ago

As an enhancement, it'd be nice if the displayed artist could show up as the one for the song if the song artist and album artist differ. For example, right now, the song "Vengeance" by Perturbator off the Hotline Miami OST shows up as

Various Artists: Hotline Miami OST
Vengeance

when it would be give more info if it said either

Perturbator: Hotline Miami OST
Vengeance

or (more correctly)

Hotline Miami OST
Perturbator: Vengeance
Jengamon commented 3 years ago

Use %track artist% to indicate track artists (and it's only set if %album artist% =/= %artist%), so to get:

Hotline Miami OST
Pertubator: Vengence

in your rich Discord presence,

set top text field (On the Tools -> Rich Discord Presence preference page) to:

[[$if(%track artist%,,%album artist%): ][%album%]]

and bottom to:

[%track artist%: ][%title%]

Examples: Where album artist =/= artist: image Where album artist == artist: (This song was a single where the album name was the name of the song, so...) image

dninemfive commented 3 years ago

Thank you! This works great.