# HG changeset patch # User Yoshiki Yazawa # Date 1186844795 -32400 # Node ID eb0913bf54c350617021834aec2dcb1f3a4d179b # Parent de03e6ff615de3577e13b5df73eec908c0fc818d use get_gentitle_format() to get format string so that presets and custom string can coexist. diff -r de03e6ff615d -r eb0913bf54c3 src/aac/src/libmp4.c --- 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); diff -r de03e6ff615d -r eb0913bf54c3 src/alac/plugin.c --- 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); diff -r de03e6ff615d -r eb0913bf54c3 src/cdaudio-ng/cdaudio-ng.c --- 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; } diff -r de03e6ff615d -r eb0913bf54c3 src/console/Audacious_Driver.cxx --- 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); diff -r de03e6ff615d -r eb0913bf54c3 src/cue/cuesheet.c --- 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); diff -r de03e6ff615d -r eb0913bf54c3 src/filewriter/filewriter.c --- 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 diff -r de03e6ff615d -r eb0913bf54c3 src/flacng/tools.c --- 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); diff -r de03e6ff615d -r eb0913bf54c3 src/madplug/decoder.c --- 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, diff -r de03e6ff615d -r eb0913bf54c3 src/madplug/input.c --- 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) { diff -r de03e6ff615d -r eb0913bf54c3 src/musepack/libmpc.cxx --- 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")); diff -r de03e6ff615d -r eb0913bf54c3 src/sexypsf/plugin.c --- 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 diff -r de03e6ff615d -r eb0913bf54c3 src/timidity/src/xmms-timidity.c --- 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")); diff -r de03e6ff615d -r eb0913bf54c3 src/tta/libtta.c --- 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 diff -r de03e6ff615d -r eb0913bf54c3 src/vtx/vtx.c --- 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); diff -r de03e6ff615d -r eb0913bf54c3 src/wav/wav.c --- 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); diff -r de03e6ff615d -r eb0913bf54c3 src/wma/wma.c --- 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)