diff --git a/web/src/js/app.js b/web/src/js/app.js index 7fdecd0..da2fb2f 100644 --- a/web/src/js/app.js +++ b/web/src/js/app.js @@ -15,7 +15,9 @@ var app = angular.module('piradio', ['ngRoute', 'ui.bootstrap']) $scope.serverStatus = serverStatus; }) .controller('TransportController', function($scope, slimClient) { + $scope.ctrl_fb = slimClient.ctrl_fb; $scope.ctrl_play = slimClient.ctrl_play; $scope.ctrl_pause = slimClient.ctrl_pause; + $scope.ctrl_ff = slimClient.ctrl_ff; }); diff --git a/web/src/js/browse_album.js b/web/src/js/browse_album.js index 445bc17..5062d41 100644 --- a/web/src/js/browse_album.js +++ b/web/src/js/browse_album.js @@ -2,6 +2,10 @@ function AlbumController($scope, $routeParams, slimClient) { $scope.client = slimClient; + $scope.add_track = slimClient.add_track; + $scope.add_album = slimClient.add_album; + $scope.add_artist = slimClient.add_artist; + $scope.init = function() { var album = $routeParams.album; if (album != "") { diff --git a/web/src/js/browse_artist.js b/web/src/js/browse_artist.js index 7e57ce1..0e87dc1 100644 --- a/web/src/js/browse_artist.js +++ b/web/src/js/browse_artist.js @@ -2,6 +2,10 @@ function ArtistController($scope, $routeParams, slimClient) { $scope.client = slimClient; + $scope.add_track = slimClient.add_track; + $scope.add_album = slimClient.add_album; + $scope.add_artist = slimClient.add_artist; + $scope.init = function() { var artist = $routeParams.artist; if (artist != "") { diff --git a/web/src/js/browse_track.js b/web/src/js/browse_track.js index cc566c3..c647e4a 100644 --- a/web/src/js/browse_track.js +++ b/web/src/js/browse_track.js @@ -2,6 +2,10 @@ function TrackController($scope, $routeParams, slimClient) { $scope.client = slimClient; + $scope.add_track = slimClient.add_track; + $scope.add_album = slimClient.add_album; + $scope.add_artist = slimClient.add_artist; + $scope.init = function() { var track = $routeParams.track; if (track != "") { diff --git a/web/src/js/playlist.js b/web/src/js/playlist.js index b2edeb6..d6a4051 100644 --- a/web/src/js/playlist.js +++ b/web/src/js/playlist.js @@ -1,3 +1,10 @@ -function PlaylistController($scope) { +function PlaylistController($scope, slimClient) { + + $scope.init = function() { + slimClient.player_status(). + success(function(result) { + $scope.data = result; + }); + }; } diff --git a/web/src/js/slim-client.js b/web/src/js/slim-client.js index 05cab75..8af2a51 100644 --- a/web/src/js/slim-client.js +++ b/web/src/js/slim-client.js @@ -52,6 +52,8 @@ function SlimClient($http, $location, serverStatus) { }; this.ctrl_fb = function() { + data = ["playlist", "index", "-1"]; + return slimRequest(data); }; this.ctrl_play = function() { @@ -65,8 +67,13 @@ function SlimClient($http, $location, serverStatus) { }; this.ctrl_ff = function() { + data = ["playlist", "index", "+1"]; + return slimRequest(data); }; - + this.player_status = function() { + data = ["status", 0, 100, "tags:adelsty"]; + return slimRequest(data); + } };