remember last folder in browser
authorSuperBFG7 <daniel@despite.ch>
Thu, 22 Oct 2015 09:44:50 +0000 (11:44 +0200)
committerSuperBFG7 <daniel@despite.ch>
Thu, 22 Oct 2015 09:44:50 +0000 (11:44 +0200)
htdocs/js/mpd.js

index 51e8fdc..a69d97e 100644 (file)
@@ -329,7 +329,10 @@ function webSocketConnect() {
                         click: function() {
                             switch($(this).attr('class')) {
                                 case 'dir':
-                                    app.setLocation("#/browse/0/"+$(this).attr("uri"));
+                                    pagination = 0;
+                                    browsepath = $(this).attr("uri");
+                                    $("#browse > a").attr("href", '#/browse/'+pagination+'/'+browsepath);
+                                    app.setLocation('#/browse/'+pagination+'/'+browsepath);
                                     break;
                                 case 'song':
                                     socket.send("MPD_API_ADD_TRACK," + decodeURI($(this).attr("uri")));