Mercurial > audlegacy
changeset 3017:80cf8f8b0651 trunk
branch merge
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Mon, 09 Jul 2007 13:05:05 +0200 |
parents | e84073b61ba5 (current diff) 02a62ac3d9c2 (diff) |
children | 89b85a1b7fd2 6065d70cb790 |
files | |
diffstat | 2 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/input.c Mon Jul 09 13:02:50 2007 +0200 +++ b/src/audacious/input.c Mon Jul 09 13:05:05 2007 +0200 @@ -317,6 +317,10 @@ * Adapted to use the NewVFS extension probing system if enabled. * * --nenolod, Dec 12 2006 + * + * Adapted to use the mimetype system. + * + * --nenolod, Jul 9 2007 */ InputPlugin * input_check_file(const gchar * filename, gboolean show_warning) @@ -328,6 +332,7 @@ gint ret = 1; gchar *ext, *tmp, *tmp_uri; gboolean use_ext_filter; + gchar *mimetype; filename_proxy = g_strdup(filename); @@ -348,6 +353,14 @@ (fd != NULL && (!g_strncasecmp(filename, "/", 1) || !g_strncasecmp(filename, "file://", 7))) ? TRUE : FALSE; + mimetype = vfs_get_metadata(fd, "content-type"); + if ((ip = mime_get_plugin(mimetype)) != NULL) + { + g_free(filename_proxy); + vfs_fclose(fd); + return ip; + } + for (node = get_input_list(); node != NULL; node = g_list_next(node)) { ip = INPUT_PLUGIN(node->data);