Commit 9cba28d8 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Web Interface: correctly select extensions

Close #6544
(cherry picked from commit 0585f02300f36b5149efff555b3ea65d7fd3ed49)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent d87f79fa
...@@ -166,8 +166,9 @@ function browse(dir) { ...@@ -166,8 +166,9 @@ function browse(dir) {
var tgt = browse_target.indexOf('__') == -1 ? browse_target : browse_target.substr(0, browse_target.indexOf('__')); var tgt = browse_target.indexOf('__') == -1 ? browse_target : browse_target.substr(0, browse_target.indexOf('__'));
$('#browse_elements').empty(); $('#browse_elements').empty();
$('element', data).each(function () { $('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) { var ext = $(this).attr('name').substr($(this).attr('name').lastIndexOf('.') + 1);
$('#browse_elements').append(createElementLi($(this).attr('name'), $(this).attr('type'), $(this).attr('uri'), $(this).attr('name').substr(-3))); 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 () { $('[opendir]').dblclick(function () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment