sync develop with local dev

This commit is contained in:
Trevor Squillario 2014-04-05 11:53:30 -04:00
parent 09ac96526e
commit 149688b8ca
23 changed files with 496 additions and 157 deletions

View file

@ -181,7 +181,7 @@ function ArchiveCtrl($scope, $rootScope, $location, $routeParams, $http, utils,
}
});
};
utils.mapSong = function (key, song, server, dir, identifier, coverart) {
$scope.mapSong = function (key, song, server, dir, identifier, coverart) {
var url, time, track, title, rating, starred, contenttype, suffix;
var specs = '';
if (song.format == 'VBR MP3') {
@ -212,7 +212,7 @@ function ArchiveCtrl($scope, $rootScope, $location, $routeParams, $http, utils,
var items = data.files;
if (action == 'add') {
angular.forEach(items, function (item, key) {
var song = utils.mapSong(key, item, server, dir, identifier, coverart);
var song = $scope.mapSong(key, item, server, dir, identifier, coverart);
if (song) {
$rootScope.queue.push(song);
}
@ -223,7 +223,7 @@ function ArchiveCtrl($scope, $rootScope, $location, $routeParams, $http, utils,
} else if (action == 'play') {
$rootScope.queue = [];
angular.forEach(items, function (item, key) {
var song = utils.mapSong(key, item, server, dir, identifier, coverart);
var song = $scope.mapSong(key, item, server, dir, identifier, coverart);
if (song) {
$rootScope.queue.push(song);
}
@ -238,7 +238,7 @@ function ArchiveCtrl($scope, $rootScope, $location, $routeParams, $http, utils,
$scope.album = [];
$rootScope.song = [];
angular.forEach(items, function (item, key) {
var song = utils.mapSong(key, item, server, dir, identifier, coverart);
var song = $scope.mapSong(key, item, server, dir, identifier, coverart);
if (song) {
$rootScope.song.push(song);
}