changeset 1473:eb0913bf54c3

use get_gentitle_format() to get format string so that presets and custom string can coexist.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Sun, 12 Aug 2007 00:06:35 +0900
parents de03e6ff615d
children 10791910b866
files src/aac/src/libmp4.c src/alac/plugin.c src/cdaudio-ng/cdaudio-ng.c src/console/Audacious_Driver.cxx src/cue/cuesheet.c src/filewriter/filewriter.c src/flacng/tools.c src/madplug/decoder.c src/madplug/input.c src/musepack/libmpc.cxx src/sexypsf/plugin.c src/timidity/src/xmms-timidity.c src/tta/libtta.c src/vtx/vtx.c src/wav/wav.c src/wma/wma.c
diffstat 16 files changed, 19 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/src/aac/src/libmp4.c	Sat Aug 11 17:57:19 2007 +0300
+++ b/src/aac/src/libmp4.c	Sun Aug 12 00:06:35 2007 +0900
@@ -460,7 +460,7 @@
     gchar *title;
     Tuple *tuple = mp4_get_song_tuple(filename);
 
-    title = tuple_formatter_process_string(tuple, cfg.gentitle_format);
+    title = tuple_formatter_process_string(tuple, get_gentitle_format());
 
     tuple_free(tuple);
 
--- a/src/alac/plugin.c	Sat Aug 11 17:57:19 2007 +0300
+++ b/src/alac/plugin.c	Sun Aug 12 00:06:35 2007 +0900
@@ -336,7 +336,7 @@
 
     /* Get the titlestring ready. */
     ti = build_tuple_from_demux(&demux_res, (char *) args);
-    title = tuple_formatter_process_string(ti, cfg.gentitle_format);
+    title = tuple_formatter_process_string(ti, get_gentitle_format());
 
     /* initialise the sound converter */
     demux_res.alac = create_alac(demux_res.sample_size, demux_res.num_channels);
--- a/src/cdaudio-ng/cdaudio-ng.c	Sat Aug 11 17:57:19 2007 +0300
+++ b/src/cdaudio-ng/cdaudio-ng.c	Sun Aug 12 00:06:35 2007 +0900
@@ -486,7 +486,7 @@
 	is_paused = FALSE;
 
 	tuple = create_tuple_from_trackinfo(pinputplayback->filename);
-	title = tuple_formatter_process_string(tuple, xmms_get_gentitle_format());
+	title = tuple_formatter_process_string(tuple, get_gentitle_format());
 
 	inputplugin.set_info(title, calculate_track_length(trackinfo[trackno].startlsn, trackinfo[trackno].endlsn), 1411200, 44100, 2);
 	free(title); title = NULL;
@@ -736,7 +736,7 @@
 	Tuple *tuple = create_tuple_from_trackinfo(filename);
 
 	if(tuple) {
-		*title = tuple_formatter_process_string(tuple, xmms_get_gentitle_format());
+		*title = tuple_formatter_process_string(tuple, get_gentitle_format());
 		tuple_free(tuple);
 		tuple = NULL;
 	}
--- a/src/console/Audacious_Driver.cxx	Sat Aug 11 17:57:19 2007 +0300
+++ b/src/console/Audacious_Driver.cxx	Sun Aug 12 00:06:35 2007 +0900
@@ -239,7 +239,7 @@
 
 static char* format_and_free_ti( Tuple* ti, int* length )
 {
-	char* result = tuple_formatter_process_string(ti, cfg.gentitle_format);
+	char* result = tuple_formatter_process_string(ti, get_gentitle_format());
 	if ( result )
 		*length = tuple_get_int(ti, "length");
 	tuple_free((void *) ti);
--- a/src/cue/cuesheet.c	Sat Aug 11 17:57:19 2007 +0300
+++ b/src/cue/cuesheet.c	Sun Aug 12 00:06:35 2007 +0900
@@ -324,7 +324,7 @@
 
 	g_return_if_fail(tuple != NULL);
 
-	*title = tuple_formatter_process_string(tuple, cfg.gentitle_format);
+	*title = tuple_formatter_process_string(tuple, get_gentitle_format());
 	*length = tuple_get_int(tuple, "length");
 
 	tuple_free(tuple);
--- a/src/filewriter/filewriter.c	Sat Aug 11 17:57:19 2007 +0300
+++ b/src/filewriter/filewriter.c	Sun Aug 12 00:06:35 2007 +0900
@@ -215,7 +215,7 @@
 
     if (filenamefromtags)
     {
-        gchar *utf8 = tuple_formatter_process_string(tuple, cfg.gentitle_format);
+        gchar *utf8 = tuple_formatter_process_string(tuple, get_gentitle_format());
 
         g_strchomp(utf8); //chop trailing ^J --yaz
 
--- a/src/flacng/tools.c	Sat Aug 11 17:57:19 2007 +0300
+++ b/src/flacng/tools.c	Sun Aug 12 00:06:35 2007 +0900
@@ -284,7 +284,7 @@
 
     input = get_tuple(filename, info);
 
-    title = tuple_formatter_process_string(input, cfg.gentitle_format);
+    title = tuple_formatter_process_string(input, get_gentitle_format());
 
     tuple_free(input);
 
--- a/src/madplug/decoder.c	Sat Aug 11 17:57:19 2007 +0300
+++ b/src/madplug/decoder.c	Sun Aug 12 00:06:35 2007 +0900
@@ -483,7 +483,7 @@
     if (info->title)
         g_free(info->title);
     info->title = tuple_formatter_process_string(info->tuple, audmad_config.title_override == TRUE ?
-                                       audmad_config.id3_format : cfg.gentitle_format);
+                                       audmad_config.id3_format : get_gentitle_format());
 
     tlen = (gint) mad_timer_count(info->duration, MAD_UNITS_MILLISECONDS),
         mad_plugin->set_info(info->title,
--- a/src/madplug/input.c	Sat Aug 11 17:57:19 2007 +0300
+++ b/src/madplug/input.c	Sun Aug 12 00:06:35 2007 +0900
@@ -464,7 +464,7 @@
     tuple_associate_string(title_input, "quality", "lossy");
 
     info->title = tuple_formatter_process_string(title_input, audmad_config.title_override == TRUE ?
-        audmad_config.id3_format : cfg.gentitle_format);
+        audmad_config.id3_format : get_gentitle_format());
 
     // for connection via proxy, we have to stop transfer once. I can't explain the reason.
     if (info->infile != NULL) {
--- a/src/musepack/libmpc.cxx	Sat Aug 11 17:57:19 2007 +0300
+++ b/src/musepack/libmpc.cxx	Sun Aug 12 00:06:35 2007 +0900
@@ -734,7 +734,7 @@
 {
     Tuple* tuple = mpcGetSongTuple(p_Filename);
 
-    char* title = tuple_formatter_process_string(tuple, cfg.gentitle_format);
+    char* title = tuple_formatter_process_string(tuple, get_gentitle_format());
 
     if (!*title)
         title = g_strdup(tuple_get_string(tuple, "file-name"));
--- a/src/sexypsf/plugin.c	Sat Aug 11 17:57:19 2007 +0300
+++ b/src/sexypsf/plugin.c	Sun Aug 12 00:06:35 2007 +0900
@@ -251,7 +251,7 @@
     Tuple *tuple = get_tuple_psf(fn);
 
     if (tuple != NULL) {
-        title = tuple_formatter_process_string(tuple, cfg.gentitle_format);
+        title = tuple_formatter_process_string(tuple, get_gentitle_format());
         tuple_free(tuple);
     }
     else
--- a/src/timidity/src/xmms-timidity.c	Sat Aug 11 17:57:19 2007 +0300
+++ b/src/timidity/src/xmms-timidity.c	Sun Aug 12 00:06:35 2007 +0900
@@ -310,7 +310,7 @@
 
 	input = tuple_new_from_filename(filename);
 
-	title = tuple_formatter_process_string(input, cfg.gentitle_format);
+	title = tuple_formatter_process_string(input, get_gentitle_format());
 	if (title == NULL || *title == '\0')
 		title = g_strdup(tuple_get_string(input, "file-name"));
 
--- a/src/tta/libtta.c	Sat Aug 11 17:57:19 2007 +0300
+++ b/src/tta/libtta.c	Sun Aug 12 00:06:35 2007 +0900
@@ -177,7 +177,7 @@
 static gchar *
 get_song_title(Tuple *tuple)
 {
-	return tuple_formatter_process_string(tuple, cfg.gentitle_format);
+	return tuple_formatter_process_string(tuple, get_gentitle_format());
 }
 
 static void
--- a/src/vtx/vtx.c	Sat Aug 11 17:57:19 2007 +0300
+++ b/src/vtx/vtx.c	Sun Aug 12 00:06:35 2007 +0900
@@ -234,7 +234,7 @@
       seek_to = -1;
 
       ti = vtx_get_song_tuple_from_vtx(playback->filename, &vtx);
-      buf = tuple_formatter_process_string(ti, cfg.gentitle_format);
+      buf = tuple_formatter_process_string(ti, get_gentitle_format());
 
       vtx_ip.set_info (buf, vtx.hdr.regdata_size / 14 * 1000 / 50,
  	  	       14 * 50 * 8, freq, bits / 8);
@@ -298,7 +298,7 @@
   if (ayemu_vtx_open (&tmp, filename)) {
     Tuple *ti = vtx_get_song_tuple_from_vtx(filename, &tmp);
 
-    *title = tuple_formatter_process_string(ti, cfg.gentitle_format);
+    *title = tuple_formatter_process_string(ti, get_gentitle_format());
     *length = tuple_get_int(ti, "length");
 
     ayemu_vtx_free (&tmp);
--- a/src/wav/wav.c	Sat Aug 11 17:57:19 2007 +0300
+++ b/src/wav/wav.c	Sun Aug 12 00:06:35 2007 +0900
@@ -215,7 +215,7 @@
     tuple_associate_string(tuple, "codec", "RIFF/WAV Audio (ADPCM)");
     tuple_associate_string(tuple, "quality", "lossless");
 
-    title = tuple_formatter_process_string(tuple, cfg.gentitle_format);
+    title = tuple_formatter_process_string(tuple, get_gentitle_format());
     if (*title == '\0')
     {
         g_free(title);
--- a/src/wma/wma.c	Sat Aug 11 17:57:19 2007 +0300
+++ b/src/wma/wma.c	Sun Aug 12 00:06:35 2007 +0900
@@ -303,7 +303,7 @@
     if (in->duration)
         tuple_associate_int(ti, "length", in->duration / 1000);
     
-    ret = tuple_formatter_process_string(ti, cfg.gentitle_format);
+    ret = tuple_formatter_process_string(ti, get_gentitle_format());
 
     return ret;
 }
@@ -324,7 +324,7 @@
         return;
 
     (*len_real) = tuple_get_int(tuple, "length");
-    (*title_real) = tuple_formatter_process_string(tuple, cfg.gentitle_format);
+    (*title_real) = tuple_formatter_process_string(tuple, get_gentitle_format());
 }
 
 static void wma_playbuff(InputPlayback *playback, int out_size)