]> Untitled Git - ympd.git/commitdiff
make A-Z filters work also on songs and playlists
authorSuperBFG7 <daniel@despite.ch>
Fri, 11 May 2018 19:10:22 +0000 (21:10 +0200)
committerSuperBFG7 <daniel@despite.ch>
Fri, 11 May 2018 19:10:22 +0000 (21:10 +0200)
htdocs/js/mpd.js

index 84a083b8cea7930ae5501aebb66db4073ce046c0..913c0d9eec3fdca1f2b86484d000697c2797ca88 100644 (file)
@@ -1083,9 +1083,11 @@ function set_filter (c) {
        $('#salamisandwich > tbody > tr.song').addClass('hide');
        $('#salamisandwich > tbody > tr.plist').removeClass('hide');
     } else {
-       $('#salamisandwich > tbody > tr.plist').addClass('hide');
-               $.each($('#salamisandwich > tbody > tr.dir'), function(i, line) {
+               $.each($('#salamisandwich > tbody > tr'), function(i, line) {
                        var first = basename($(line).attr('uri'))[0];
+                       if ( $(line).hasClass('song') ) {
+                               first = $(line).children().eq(1).text()[0];
+                       }
 
                        if (filter === "num") {
                                if (!isNaN(first)) {