mpris-lyrics a simple Linux CLI that displays synced lyrics from the MPRIS xesam:asText property

11 days ago by AMA to c/rust

So yeah, as the probably unnecessarily long title says, this is a CLI that displays the current playing lyrics, but instead of trying to go online and fetch a match it just uses the already there xesam:asText property in MPRIS.

Sadly a lot of popular players that implement the MPRIS2 standard still don't implement that specific one, so it wont work with them. Even the one used in the showcase had to be modified, tho I am hopefully gonna upstream it soon.

I am very strict about AI usage, so for this project the only hint of AI that was used was for tab auto completion that is just used for boilerplate like, idk, implementing the Default trait for PlayerState (not including the actual tricky metadata_last_updated part). Safe to say it was only one notch above no AI at all.

So yeah, here you go give it a try and feel free to roast me, after all this is my first cli and cargo publish ;)

Blauzahn 3 points 9 days ago

Which players do actually support mpris this way?

path: 0 26168352, hotness: undefined, score: 3, children: 1
AMA 1 point 8 days ago

Not a lot. The only ones I know of are:

so yeah, a lot of people wont be able to use it :( tho they still can use one of the many that fetch from lrclib

path: 0 26168352 26197127, hotness: undefined, score: 1, children: 0
canaryWart 2 points 11 days ago

There's another notch where you only ask questions and do the writing alone

path: 0 26143101, hotness: undefined, score: 2, children: 1
AMA 2 points 11 days ago

wdym?

I specifically don't use AI for questions, just read the docs.

path: 0 26143101 26143395, hotness: undefined, score: 2, children: 0
Kissaki 2 points 9 days ago

The Media Player Remote Interfacing Specification (MPRIS) is a standard D-Bus interface which aims to provide a common programmatic API for controlling media players.

This metadata is only for media streams, not something that would be embedded as metadata in a file?

path: 0 26171543, hotness: undefined, score: 2, children: 1
AMA 2 points 8 days ago

MPRIS is the spec that Linux desktops use to make players transfer metadata about the thing they are playing and its state.

For example: title, artists, cover art, position, playing/paused, etc...

It doesn't specify where the metadata should come from, for example the xesam:asText can be populated with lyrics from the metadata embedded in the song file itself, a companion .lrc file or even fetched from lrclib by the player, as long as the player is the one doing the IO and populating it.

path: 0 26171543 26197231, hotness: undefined, score: 2, children: 0
rust
rust

@programming.dev

login for more options
8322
1422
379

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits
  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

go to feed...