A single-purpose library for all your music related needs
Lyria provides a simple way of fetching metadata from the song you're listening to on Linux systems (running systemd) See the example here Mini example:
dbus = DBusInitializer()
val currentPlayerType = dbus.determinePlayer()
if (currentPlayerType == PlayerType.None) {
error("No media player detected")
}
val source = dbus.getSource(currentPlayerType)
playerBusName = source.getPlayer()
currentTrack = dbus.getCurrentTrack(source)To install the library, you need to add the jitpack repository to your build system's config
repositories {
maven("https://jitpack.io")
}
const val lyriaVersion: String = "REPLACE-VERSION"
dependencies {
implementation("com.github.Clueeng:Lyria:$lyriaVersion")
}