Handlebars.registerHelper('trackname', function() {
var item = this;
if(!item.metadata)
return item.name;
if(item.metadata.title)
return item.metadata.title;
else
return item.name;
});
var templates = new (function Templates() {
this.directory_item = Handlebars.compile('
{{trackname}} | {{metadata.artist}} | {{metadata.album}} |
');
// The playlist automatically adds a tr tag.
this.playlist_item = Handlebars.compile('{{trackname}} | {{metadata.artist}} | {{metadata.album}} | | ');
this.albums_item = Handlebars.compile('');
this.album_tab = Handlebars.compile('');
this.album_tabli = Handlebars.compile('Album: {{album.name}} Remove tab');
})();