| | |
| | | } |
| | | self.media_liste(); |
| | | } else { |
| | | self.removeClassMulti('selected'); |
| | | t.classList.add('selected'); |
| | | if(t.classList.contains('selected')) { |
| | | self.addSelectedTitel(); |
| | | } else { |
| | | self.removeClassMulti('selected'); |
| | | t.classList.add('selected'); |
| | | } |
| | | //self.selTitel = new Titel(t.textContent, self.ortPfad); |
| | | } |
| | | }); |
| | |
| | | var titelName = document.querySelector(".selected").textContent; |
| | | var titel; |
| | | if(self.mediaPfad.endsWith('/')) { |
| | | titel = new Titel(self.mediaPfad + titelName, self.ortPfad); |
| | | titel = new Titel(titelName, self.mediaPfad, self.ortPfad); |
| | | } else { |
| | | titel = new Titel(self.mediaPfad + '/' + titelName, self.ortPfad); |
| | | titel = new Titel(titelName, self.mediaPfad + '/', self.ortPfad); |
| | | } |
| | | var plname = document.querySelector('#playlist').value; |
| | | self.http_put('../api/alist/' + plname, JSON.stringify(titel), function(responseText) { |
| | |
| | | this.name = n; |
| | | } |
| | | |
| | | function Titel(n, u) { |
| | | function Titel(n, p, u) { |
| | | this.katalogUrl = u; |
| | | this.pfad = p; |
| | | this.name = n; |
| | | } |