discomfitor pushed a commit to branch master.

http://git.enlightenment.org/apps/empc.git/commit/?id=2a580715edbdd6363c44d91fa964745d6faac965

commit 2a580715edbdd6363c44d91fa964745d6faac965
Author: zmike <michael.blumenkra...@gmail.com>
Date:   Sat Apr 11 11:43:30 2015 -0400

    use int for empd_song_track
    
    a song can have a track == 0, which results in multiple "empc,bg,changed" 
signal
    callbacks being added, which ruins cover animations
---
 src/bin/empc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/bin/empc.c b/src/bin/empc.c
index d9eb3b7..866a1ee 100644
--- a/src/bin/empc.c
+++ b/src/bin/empc.c
@@ -88,7 +88,7 @@ EAPI Eina_Hash *empd_current_queue_headers = NULL;
 
 Eina_Stringshare *empd_music_directory = NULL;
 static int empd_songid = -1;
-static unsigned int empd_song_track = 0;
+static int empd_song_track = -1;
 static Eina_Stringshare *empd_song_title = NULL;
 static Eina_Stringshare *empd_song_artist = NULL;
 static Eina_Stringshare *empd_song_album = NULL;
@@ -933,7 +933,7 @@ album_changed(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, const char *
 static void
 title_text_set(void)
 {
-   if (empd_song_track)
+   if (empd_song_track > 0)
      {
         char buf[1024];
 
@@ -1034,7 +1034,7 @@ songid_update(int songid)
    /* don't allow set until song exists */
    if (!so) return 0;
    empd_song_item = it;
-   if (!empd_song_track)
+   if (empd_song_track == -1)
      elm_object_signal_callback_add(layout, "empc,bg,changed", "empc", 
bg_changed, NULL);
    empd_song_track = so->track;
    eina_stringshare_refplace(&empd_song_title, so->title);
@@ -2827,7 +2827,7 @@ queue_list_handler(Eina_Value *value, Eina_Bool cached)
                        elm_genlist_item_update(it);
                        if (so->songid == empd_songid)
                          {
-                            if ((so->track != (int)empd_song_track) || 
(empd_song_title != so->title))
+                            if ((so->track != empd_song_track) || 
(empd_song_title != so->title))
                               {
                                  empd_song_track = so->track;
                                  eina_stringshare_refplace(&empd_song_title, 
so->title);

-- 


Reply via email to