From 5663c2a8c148f14e5c5c6dee5f33cbfb9a719c52 Mon Sep 17 00:00:00 2001 From: zvon Date: Fri, 29 May 2020 22:07:53 +0200 Subject: [PATCH] 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 --- Makefile | 2 +- main.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f81b923..eef2a94 100644 --- a/Makefile +++ b/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 diff --git a/main.c b/main.c index b74c666..642d845 100644 --- a/main.c +++ b/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 );