File fix-mpd-fpe.patch of Package sfwbar

Index: sfwbar-1.0_beta16.1-build/sfwbar-1.0_beta16.1/modules/mpd.c
===================================================================
--- a/modules/mpd.c
+++ b/modules/mpd.c
@@ -22,19 +22,15 @@ static gboolean mpd_connect ( gpointer d
 
 static gboolean mpd_timer ( gpointer data )
 {
-  static guint64 last, current;
+	  if( !status || mpd_status_get_state(status) != MPD_STATE_PLAY )
+	  {
+	    timer = FALSE;
+	    return FALSE;
+	  }
 
-  if( !status || mpd_status_get_state(status)!=MPD_STATE_PLAY )
-  {
-    timer = FALSE;
-    return FALSE;
-  }
+	  trigger_emit("mpd-progress");
 
-  current = g_get_monotonic_time();
-  if((current-last)/mpd_status_get_total_time(status)/10 > 1)
-    trigger_emit("mpd-progress");
-
-  return TRUE;
+	  return TRUE;
 }
 
 static gboolean mpd_update ( void )
openSUSE Build Service is sponsored by