changeset 1738:e1ebf3fc1a16

- follow the change of libaudid3tag.so's location. - little cleanup.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Wed, 19 Sep 2007 18:07:12 +0900
parents b729c7a72c20
children 5092ba62a566
files src/madplug/Makefile src/madplug/plugin.c
diffstat 2 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/madplug/Makefile	Wed Sep 19 18:00:10 2007 +0900
+++ b/src/madplug/Makefile	Wed Sep 19 18:07:12 2007 +0900
@@ -20,6 +20,6 @@
 CFLAGS   += $(PICFLAGS) $(GTK_CFLAGS) $(GLIB_CFLAGS) $(PANGO_CFLAGS) $(ARCH_DEFINES) $(SIMD_CFLAGS) -I../../intl -I../.. -Wall
 
 LDFLAGS += $(AUDLDFLAGS)
-LIBADD = -L/opt/local/lib -L$(plugindir) -laudid3tag -lmad $(GTK_LIBS) $(GLIB_LIBS) $(PANGO_LIBS)
+LIBADD = -L/opt/local/lib -L$(libdir) -laudid3tag -lmad $(GTK_LIBS) $(GLIB_LIBS) $(PANGO_LIBS)
 
 include ../../mk/objective.mk
--- a/src/madplug/plugin.c	Wed Sep 19 18:00:10 2007 +0900
+++ b/src/madplug/plugin.c	Wed Sep 19 18:07:12 2007 +0900
@@ -520,10 +520,10 @@
             *title = g_strdup(tuple_get_string(myinfo.tuple, -1, "track-name"));
         else
             *title = g_strdup(url);
-        if(tuple_get_int(myinfo.tuple, FIELD_LENGTH, NULL) == -1)
+
+        *length = tuple_get_int(myinfo.tuple, FIELD_LENGTH, NULL);
+        if(*length == -1)
             *length = mad_timer_count(myinfo.duration, MAD_UNITS_MILLISECONDS);
-        else
-            *length = tuple_get_int(myinfo.tuple, FIELD_LENGTH, NULL);
     }
     else {
         *title = g_strdup(url);
@@ -553,10 +553,9 @@
     }
 
     if (input_get_info(&myinfo, info.remote ? TRUE : audmad_config.fast_play_time_calc) == TRUE) {
-        if(tuple_get_int(myinfo.tuple, FIELD_LENGTH, NULL) == -1)
+        *length = tuple_get_int(myinfo.tuple, FIELD_LENGTH, NULL);
+        if(*length == -1)
             *length = mad_timer_count(myinfo.duration, MAD_UNITS_MILLISECONDS);
-        else
-            *length = tuple_get_int(myinfo.tuple, FIELD_LENGTH, NULL);
     }
     else {
         *length = -1;