Mercurial > audlegacy
changeset 1982:cf33371e7ac3 trunk
[svn] - enhancements to the NewVFS probing layer.
author | nenolod |
---|---|
date | Sat, 18 Nov 2006 19:44:58 -0800 |
parents | 6f4924bb1908 |
children | 041d40c0f640 |
files | ChangeLog audacious/input.c |
diffstat | 2 files changed, 39 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Nov 16 12:14:22 2006 -0800 +++ b/ChangeLog Sat Nov 18 19:44:58 2006 -0800 @@ -1,3 +1,10 @@ +2006-11-16 20:14:22 +0000 Tony Vroon <chainsaw@gentoo.org> + revision [2949] + Updated dutch translation. + trunk/po/nl.po | 2349 +-------------------------------------------------------- + 1 file changed, 43 insertions(+), 2306 deletions(-) + + 2006-11-16 19:58:25 +0000 William Pitcock <nenolod@nenolod.net> revision [2945] - strip cruft from pl.po
--- a/audacious/input.c Thu Nov 16 12:14:22 2006 -0800 +++ b/audacious/input.c Sat Nov 18 19:44:58 2006 -0800 @@ -463,19 +463,29 @@ GList *node; gchar *tmp = NULL, *ext; gchar *filename_proxy; + VFSFile *fd; g_return_if_fail(filename != NULL); g_return_if_fail(title != NULL); g_return_if_fail(length != NULL); filename_proxy = g_strdup(filename); + fd = vfs_fopen(filename, "rb"); for (node = get_input_list(); node != NULL; node = g_list_next(node)) { ip = INPUT_PLUGIN(node->data); - if (input_is_enabled(ip->filename) && ip->is_our_file(filename_proxy)) + if (ip && input_is_enabled(ip->filename) && + (ip->is_our_file_from_vfs != NULL && + (ret = ip->is_our_file_from_vfs(filename_proxy, fd) > 0) || + (ip->is_our_file != NULL && + (ret = ip->is_our_file(filename_proxy)) > 0))) { + g_free(filename_proxy); break; + } } + vfs_fclose(fd); + if (ip && node && ip->get_song_info) { ip->get_song_info(filename_proxy, &tmp, length); *title = str_to_utf8(tmp); @@ -517,18 +527,28 @@ GList *node; gchar *tmp = NULL, *ext; gchar *filename_proxy; + VFSFile *fd; if (filename == NULL) return NULL; filename_proxy = g_strdup(filename); + fd = vfs_fopen(filename, "rb"); for (node = get_input_list(); node != NULL; node = g_list_next(node)) { ip = INPUT_PLUGIN(node->data); - if (input_is_enabled(ip->filename) && ip->is_our_file(filename_proxy)) + if (ip && input_is_enabled(ip->filename) && + (ip->is_our_file_from_vfs != NULL && + (ret = ip->is_our_file_from_vfs(filename_proxy, fd) > 0) || + (ip->is_our_file != NULL && + (ret = ip->is_our_file(filename_proxy)) > 0))) { + g_free(filename_proxy); break; + } } + vfs_fclose(fd); + if (ip && node && ip->get_song_tuple) input = ip->get_song_tuple(filename_proxy); else { @@ -629,23 +649,31 @@ GList *node; InputPlugin *ip; gchar *filename_proxy; + VFSFile *fd; filename_proxy = g_strdup(filename); + fd = vfs_fopen(filename, "rb"); + for (node = get_input_list(); node != NULL; node = g_list_next(node)) { ip = INPUT_PLUGIN(node->data); - if (input_is_enabled(ip->filename) - && ip->is_our_file(filename_proxy)) { + if (ip && input_is_enabled(ip->filename) && + (ip->is_our_file_from_vfs != NULL && + (ret = ip->is_our_file_from_vfs(filename_proxy, fd) > 0) || + (ip->is_our_file != NULL && + (ret = ip->is_our_file(filename_proxy)) > 0))) { if (ip->file_info_box) ip->file_info_box(filename_proxy); else input_general_file_info_box(filename, ip); + vfs_fclose(fd); g_free(filename_proxy); return; } } + vfs_close(fd); input_general_file_info_box(filename, NULL); g_free(filename_proxy); }