vlc | branch: master | Jean-Baptiste Kempf <[email protected]> | Sat Mar 31 22:53:17 2012 +0200| [0585f02300f36b5149efff555b3ea65d7fd3ed49] | committer: Jean-Baptiste Kempf
Web Interface: correctly select extensions Close #6544 > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0585f02300f36b5149efff555b3ea65d7fd3ed49 --- share/lua/http/js/controlers.js | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/share/lua/http/js/controlers.js b/share/lua/http/js/controlers.js index 805f3bb..e9a6067 100644 --- a/share/lua/http/js/controlers.js +++ b/share/lua/http/js/controlers.js @@ -166,8 +166,9 @@ function browse(dir) { var tgt = browse_target.indexOf('__') == -1 ? browse_target : browse_target.substr(0, browse_target.indexOf('__')); $('#browse_elements').empty(); $('element', data).each(function () { - if ($(this).attr('type') == 'dir' || $.inArray($(this).attr('name').substr(-3), video_types) != -1 || $.inArray($(this).attr('name').substr(-3), audio_types) != -1) { - $('#browse_elements').append(createElementLi($(this).attr('name'), $(this).attr('type'), $(this).attr('uri'), $(this).attr('name').substr(-3))); + var ext = $(this).attr('name').substr($(this).attr('name').lastIndexOf('.') + 1); + if ($(this).attr('type') == 'dir' || $.inArray(ext, video_types) != -1 || $.inArray(ext, audio_types) != -1) { + $('#browse_elements').append(createElementLi($(this).attr('name'), $(this).attr('type'), $(this).attr('uri'), ext)); } }); $('[opendir]').dblclick(function () { _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
