| | |
| | | } |
| | | }; |
| | | |
| | | /* |
| | | |
| | | {"Medialiste": [{"name":"sound_city.m4v","typ":"video","interpret":"","titelAnzName":"","album":""},{"name":"sub","typ":"folder","interpret":"","titelAnzName":"","album":""},{"name":"Aufnahmen.ods","typ":"file","interpret":"","titelAnzName":"","album":""},{"name":"index.html","typ":"file","interpret":"","titelAnzName":"","album":""},{"name":"A","typ":"folder","interpret":"","titelAnzName":"","album":""},{"name":"sleepers.m4v","typ":"video","interpret":"","titelAnzName":"","album":""}]} |
| | | |
| | | |
| | | function Titel(n, p, u, i, t, a) { |
| | | this.katalogUrl = u; |
| | | this.pfad = p; |
| | | this.name = n; |
| | | this.interpret = i; |
| | | this.titelAnzName = t; |
| | | this.album = a; |
| | | } |
| | | |
| | | */ |
| | | |
| | | this.addSelectedTitel = function() { |
| | | var titelName = document.querySelector(".selected").textContent; |
| | | var elem = document.querySelector(".selected"); |
| | | var titelName = elem.textContent; |
| | | var album = elem.attributes.album.nodeValue; |
| | | var interpret = elem.attributes.interpret.nodeValue; |
| | | var anzName = elem.attributes.titelAnzName.nodeValue; |
| | | var titel; |
| | | if(self.mediaPfad.endsWith('/')) { |
| | | titel = new Titel(titelName, self.mediaPfad, self.ortPfad); |
| | | titel = new Titel(titelName, self.mediaPfad, self.ortPfad, interpret, anzName, album); |
| | | } else { |
| | | titel = new Titel(titelName, self.mediaPfad + '/', self.ortPfad); |
| | | titel = new Titel(titelName, self.mediaPfad + '/', self.ortPfad, interpret, anzName, album); |
| | | } |
| | | var plname = document.querySelector('#playlist').value; |
| | | self.http_put('../api/alist/' + plname, JSON.stringify(titel), function(responseText) { |
| | |
| | | this.name = n; |
| | | } |
| | | |
| | | function Titel(n, p, u) { |
| | | function Titel(n, p, u, i, t, a) { |
| | | this.katalogUrl = u; |
| | | this.pfad = p; |
| | | this.name = n; |
| | | this.interpret = i; |
| | | this.titelAnzName = t; |
| | | this.album = a; |
| | | } |