I relized that when pause the song information might be wanted, so I'll leave it up to the user to only use 1 music player at a time
This commit is contained in:
parent
e68aa6f457
commit
5663c2a8c1
2
Makefile
2
Makefile
@ -1,5 +1,5 @@
|
||||
CC ?= clang
|
||||
CFLAGS ?= -O2 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include/ -Wall -Wextra -g
|
||||
CFLAGS ?= -O2 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include/ -Wall -Wextra
|
||||
PREFIX ?= /usr/local/bin
|
||||
LDFLAGS ?= -ldbus-1 -lmpdclient
|
||||
|
||||
|
4
main.c
4
main.c
@ -67,7 +67,7 @@ int main( int argc, char **argv ) {
|
||||
|
||||
if ( requests & SONG_FLAG || requests & META_FLAG ) {
|
||||
struct song_metadata song = { 0 };
|
||||
if ( sources & MPD_FLAG && mpdPlaying( mpd_connection ) ) {
|
||||
if ( sources & MPD_FLAG ) {
|
||||
song = mpdGetSong( mpd_connection );
|
||||
if ( requests & SONG_FLAG )
|
||||
printSong( &song );
|
||||
@ -77,8 +77,6 @@ int main( int argc, char **argv ) {
|
||||
|
||||
if ( sources & DBUS_FLAG ) {
|
||||
for ( char **player = dbus_players; *player; ++player ) {
|
||||
if ( !dbusPlaying( dbus_connection, *player ) )
|
||||
continue;
|
||||
song = dbusGetSong( dbus_connection, *player );
|
||||
if ( requests & SONG_FLAG )
|
||||
printSong( &song );
|
||||
|
Loading…
Reference in New Issue
Block a user