fix navigation in mp and use "Filesystems" to indicate topdir
authorMoritz Venn <ritzmo@users.schwerkraft.elitedvb.net>
Sat, 17 Oct 2009 15:49:19 +0000 (15:49 +0000)
committerMoritz Venn <ritzmo@users.schwerkraft.elitedvb.net>
Sat, 17 Oct 2009 15:49:19 +0000 (15:49 +0000)
webinterface/src/WebComponents/Sources/MP.py
webinterface/src/web-data/objects.js
webinterface/src/web-data/tools.js

index 68971cd..a637908 100644 (file)
@@ -89,7 +89,7 @@ class MP(Source):
                        matchingPattern = param["types"]
 
                path = param["path"]
-               if path == "undefined":
+               if path == "Filesystems":
                        path = None
                elif path is not None and not os_path.exists(path):
                        # TODO: returning something is better than just dying but is this return sane?
@@ -175,7 +175,8 @@ class MP(Source):
                return (True, "executed %s" % param)
 
        list = property(lambda self: self.result)
-       lut = {"ServiceReference": 0
-                       , "IsDirectory": 1
-                       , "Root": 2
-                       }
+       lut = {
+               "ServiceReference": 0,
+               "IsDirectory": 1,
+               "Root": 2,
+       }
index 66f9dd2..350b230 100644 (file)
@@ -567,9 +567,9 @@ function FileList(xml){
 //START class File
 function File(xml){    
        // parsing values from xml-element
-       this.servicereference = getNodeContent(xml, 'e2servicereference');
+       this.servicereference = getNodeContent(xml, 'e2servicereference', 'Filesystems');
        this.isdirectory = getNodeContent(xml, 'e2isdirectory');
-       this.root = getNodeContent(xml, 'e2root', 'undefined');
+       this.root = getNodeContent(xml, 'e2root', 'Filesystems');
 
        this.getServiceReference = function(){
                return this.servicereference;
index 917b29c..def7c13 100644 (file)
@@ -1477,6 +1477,7 @@ function incomingMediaPlayer(request){
 
 function loadMediaPlayer(directory){
        debug("[loadMediaPlayer] called");
+       if(typeof(directory) == 'undefined') directory = 'Filesystems';
        doRequest(url_mediaplayerlist+directory, incomingMediaPlayer, false);
 }