add Filename
authorRico Schulte <ricoschulte@users.schwerkraft.elitedvb.net>
Sat, 27 Jan 2007 15:57:47 +0000 (15:57 +0000)
committerRico Schulte <ricoschulte@users.schwerkraft.elitedvb.net>
Sat, 27 Jan 2007 15:57:47 +0000 (15:57 +0000)
webinterface/src/WebComponents/Sources/Movie.py
webinterface/src/web-data/objects.js

index 1e89800..3ae3b81 100644 (file)
@@ -32,10 +32,11 @@ class Movie( Source):
                 text = event.getEventName()
                 short = event.getShortDescription()
                 ext = event.getExtendedDescription()
-                print text,short,ext
                 movie.append(ext)
             else:
                 movie.append("")
+            filename = "/"+"/".join(serviceref.toString().split("/")[1:])
+            movie.append(filename)
             list.append(movie)
         print "tags",self.movielist.tags
         return list
@@ -47,5 +48,6 @@ class Movie( Source):
            ,"ServiceName": 3
            ,"Tags": 4
            ,"DescriptionExtended": 5
+           ,"Filename": 6
            }
 
index 08f87ee..d4e4b37 100644 (file)
@@ -230,6 +230,11 @@ function Movie(xml){
        } catch (e) {
                this.tags = "no&nbsp;tags"; // no whitespaces... tags will be splittet later
        }
+       try{
+               this.filename = xml.getElementsByTagName('e2filename').item(0).firstChild.data;
+       } catch (e) {
+               this.filename = "n/a";
+       }
        this.getServiceReference = function(){
                return encodeURIComponent(this.servicereference);
        }
@@ -248,6 +253,10 @@ function Movie(xml){
        this.getTags = function(){              
                return this.tags.split(" ");
        }       
+       this.getFilename = function(){          
+               return encodeURIComponent(this.filename);
+               
+       }       
 }      
 //END class Movie