Removes the player functions from the rootScope.

However, saving track's position is broken.
Some are still there because of problems I don't know how to solve, e.g. circular dependency between notifications and player.
Uses the queue controller for the sidebar queue.
Moves loadTrackPosition to the main controller.
This commit is contained in:
Hyzual 2014-11-30 18:02:15 +01:00
parent 74ac275ece
commit e5846e30f9
14 changed files with 352 additions and 278 deletions

View file

@ -1,10 +1,14 @@
angular.module('JamStash')
angular.module('jamstash.queue.ctrl', [])
.controller('QueueCtrl', ['$scope', '$rootScope', '$routeParams', '$location', 'utils', 'globals',
function QueueCtrl($scope, $rootScope, $routeParams, $location, utils, globals) {
.controller('QueueCtrl', ['$scope', '$rootScope', '$routeParams', '$location', 'utils', 'globals', 'player',
function QueueCtrl($scope, $rootScope, $routeParams, $location, utils, globals, player) {
'use strict';
$scope.settings = globals.settings;
$scope.song = $rootScope.queue;
//angular.copy($rootScope.queue, $scope.song);
$scope.itemType = 'pl';
$scope.playSong = function (loadonly, song) {
player.playSong(loadonly, song);
};
}]);