Mercurial > audlegacy
diff src/audacious/input.c @ 3492:1f250eb90dfe trunk
Merge.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 03 Sep 2007 10:41:19 +0300 |
parents | 602ec8c40d0d 820c2db12041 |
children | 95d6cbf21614 |
line wrap: on
line diff
--- a/src/audacious/input.c Sat Sep 01 16:13:17 2007 +0300 +++ b/src/audacious/input.c Mon Sep 03 10:41:19 2007 +0300 @@ -586,66 +586,6 @@ playback->plugin->set_eq(on, preamp, bands); } -void -input_get_song_info(const gchar * filename, gchar ** title, gint * length) -{ - InputPlugin *ip = NULL; - Tuple *tuple; - gchar *tmp = NULL, *ext; - gchar *filename_proxy; - ProbeResult *pr; - - g_return_if_fail(filename != NULL); - g_return_if_fail(title != NULL); - g_return_if_fail(length != NULL); - - filename_proxy = g_strdup(filename); - - pr = input_check_file(filename_proxy, FALSE); - - if (!pr) - return; - - ip = pr->ip; - - g_free(pr); - - if (ip && ip->get_song_info) { - ip->get_song_info(filename_proxy, &tmp, length); - *title = str_to_utf8(tmp); - g_free(tmp); - } - else { - tuple = tuple_new(); - - tmp = g_strdup(filename); - if ((ext = strrchr(tmp, '.'))) - *ext = '\0'; - - tuple_associate_string(tuple, FIELD_FILE_NAME, NULL, g_path_get_basename(tmp)); - - if (ext) - tuple_associate_string(tuple, FIELD_FILE_EXT, NULL, ext + 1); - - tuple_associate_string(tuple, FIELD_FILE_PATH, NULL, g_path_get_dirname(tmp)); - - tmp = tuple_formatter_process_string(tuple, get_gentitle_format()); - if (tmp != NULL && *tmp != '\0') { - (*title) = str_to_utf8(tmp); - g_free(tmp); - } - else { - (*title) = filename_to_utf8(tuple_get_string(tuple, FIELD_FILE_NAME, NULL)); - } - - (*length) = -1; - - mowgli_object_unref(tuple); - tuple = NULL; - } - - g_free(filename_proxy); -} Tuple * input_get_song_tuple(const gchar * filename)