mirror of
https://github.com/danbee/mpd-client
synced 2025-03-04 08:39:09 +00:00
18 lines
671 B
JavaScript
18 lines
671 B
JavaScript
var App = Ember.Application.create();
|
|
|
|
App.QueueRoute = Ember.Route.extend({
|
|
model: function() {
|
|
return Ember.$.getJSON('/api/queue');
|
|
}
|
|
});
|
|
|
|
App.ControlsController = Ember.Controller.extend({
|
|
actions: {
|
|
previous: function() { return Ember.$.ajax('/api/control/previous', { type: 'PUT' }); },
|
|
play: function() { return Ember.$.ajax('/api/control/play', { type: 'PUT' }); },
|
|
pause: function() { return Ember.$.ajax('/api/control/pause', { type: 'PUT' }); },
|
|
stop: function() { return Ember.$.ajax('/api/control/stop', { type: 'PUT' }); },
|
|
next: function() { return Ember.$.ajax('/api/control/next', { type: 'PUT' }); }
|
|
}
|
|
});
|