Blob Blame History Raw
diff -Nur audacious-plugin-fc-0.4-orig/configure audacious-plugin-fc-0.4/configure
--- audacious-plugin-fc-0.4-orig/configure	2009-10-23 12:31:35.000000000 +0200
+++ audacious-plugin-fc-0.4/configure	2009-10-24 12:10:42.318420354 +0200
@@ -6464,23 +6464,23 @@
   else
      PKG_CONFIG_MIN_VERSION=0.9.0
      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
-        { $as_echo "$as_me:$LINENO: checking for audacious >= 2.2" >&5
-$as_echo_n "checking for audacious >= 2.2... " >&6; }
+        { $as_echo "$as_me:$LINENO: checking for audacious >= 2.1" >&5
+$as_echo_n "checking for audacious >= 2.1... " >&6; }
 
-        if $PKG_CONFIG --exists "audacious >= 2.2" ; then
+        if $PKG_CONFIG --exists "audacious >= 2.1" ; then
             { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
             succeeded=yes
 
             { $as_echo "$as_me:$LINENO: checking AUDACIOUS_CFLAGS" >&5
 $as_echo_n "checking AUDACIOUS_CFLAGS... " >&6; }
-            AUDACIOUS_CFLAGS=`$PKG_CONFIG --cflags "audacious >= 2.2"`
+            AUDACIOUS_CFLAGS=`$PKG_CONFIG --cflags "audacious >= 2.1"`
             { $as_echo "$as_me:$LINENO: result: $AUDACIOUS_CFLAGS" >&5
 $as_echo "$AUDACIOUS_CFLAGS" >&6; }
 
             { $as_echo "$as_me:$LINENO: checking AUDACIOUS_LIBS" >&5
 $as_echo_n "checking AUDACIOUS_LIBS... " >&6; }
-            AUDACIOUS_LIBS=`$PKG_CONFIG --libs "audacious >= 2.2"`
+            AUDACIOUS_LIBS=`$PKG_CONFIG --libs "audacious >= 2.1"`
             { $as_echo "$as_me:$LINENO: result: $AUDACIOUS_LIBS" >&5
 $as_echo "$AUDACIOUS_LIBS" >&6; }
         else
@@ -6488,7 +6488,7 @@
             AUDACIOUS_LIBS=""
             ## If we have a custom action on failure, don't print errors, but
             ## do set a variable so people can do so.
-            AUDACIOUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "audacious >= 2.2"`
+            AUDACIOUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "audacious >= 2.1"`
             echo $AUDACIOUS_PKG_ERRORS
         fi
 
@@ -6503,8 +6503,8 @@
   if test $succeeded = yes; then
      :
   else
-     { { $as_echo "$as_me:$LINENO: error: Library requirements (audacious >= 2.2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
-$as_echo "$as_me: error: Library requirements (audacious >= 2.2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
+     { { $as_echo "$as_me:$LINENO: error: Library requirements (audacious >= 2.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
+$as_echo "$as_me: error: Library requirements (audacious >= 2.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
    { (exit 1); exit 1; }; }
   fi
 
diff -Nur audacious-plugin-fc-0.4-orig/src/Main.cpp audacious-plugin-fc-0.4/src/Main.cpp
--- audacious-plugin-fc-0.4-orig/src/Main.cpp	2009-10-23 17:21:56.000000000 +0200
+++ audacious-plugin-fc-0.4/src/Main.cpp	2009-10-24 12:28:28.616417561 +0200
@@ -263,13 +263,14 @@
         FC_init(fileBuf,fileLen,0,0);
         mixerInit(myFormat.freq,myFormat.bits,myFormat.channels,myFormat.zeroSample);
 
-        Tuple *t = aud_tuple_new_from_filename( playback->filename );
-        aud_tuple_associate_int(t, FIELD_LENGTH, NULL, msecSongLen);
-        aud_tuple_associate_string(t, FIELD_QUALITY, NULL, "sequenced");
-        playback->set_tuple( playback, t );
-
         gint bitsPerSec = myFormat.freq * myFormat.channels * myFormat.bits;
-        playback->set_params( playback, NULL, 0, bitsPerSec, myFormat.freq, myFormat.channels );
+        gchar* title;
+        gchar* pathSepPos = strrchr( playback->filename, '/' );
+        if ( pathSepPos!=0 && pathSepPos[1]!=0 )  // found file name
+            title = pathSepPos+1;
+        else
+            title = playback->filename;
+        playback->set_params( playback, title, msecSongLen, bitsPerSec, myFormat.freq, myFormat.channels );
         
         playback->playing = true;
         playback->set_pb_ready(playback);
@@ -337,7 +338,7 @@
     Tuple *t = aud_tuple_new_from_filename(filename);
 
     // delay length detection to start of playback
-    aud_tuple_associate_int(t, FIELD_LENGTH, NULL, 0);
+    aud_tuple_associate_int(t, FIELD_LENGTH, NULL, -1);
     aud_tuple_associate_string(t, FIELD_QUALITY, NULL, "sequenced");
     //aud_tuple_associate_string(ti, FIELD_TITLE, NULL, tmp);