1
0
mirror of https://github.com/danbee/mpd-client synced 2025-03-04 08:39:09 +00:00
mpd-client/assets/js/models/queueSong.js
2014-01-08 11:19:17 +00:00

23 lines
364 B
JavaScript

var QueueSong = can.Model.extend({
findAll: 'GET /api/queue'
}, {
formattedLength: function() {
return timeHelpers.formatLength(this.length)
}
});
QueueSong.List = can.List.extend({
updatePlaying: function(newSong) {
this.each(function(item) {
item.attr('playing', false);
});
this.attr(newSong).attr('playing', true);
}
});