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

@ -46,7 +46,7 @@ JamStash.service('utils', function ($cookieStore, globals, model) {
};
this.mapSong = function (data) {
var song = data;
var url, title, track, rating, starred, contenttype, suffix, description;
var url, title, artist, track, rating, starred, contenttype, suffix, description;
var specs = '', coverartthumb = '', coverartfull = '';
if (typeof song.coverArt != 'undefined') {
coverartthumb = globals.BaseURL() + '/getCoverArt.view?' + globals.BaseParams() + '&size=60&id=' + song.coverArt;
@ -56,6 +56,7 @@ JamStash.service('utils', function ($cookieStore, globals, model) {
coverartfull = 'images/albumdefault_160.jpg';
}
if (typeof song.description == 'undefined') { description = ''; } else { description = song.description; }
if (typeof song.artist == 'undefined') { artist = ' '; } else { artist = song.artist.toString(); }
if (typeof song.title == 'undefined') { title = ' '; } else { title = song.title.toString(); }
if (typeof song.track == 'undefined') { track = ' '; } else { track = song.track.toString(); }
if (typeof song.starred !== 'undefined') { starred = true; } else { starred = false; }
@ -65,7 +66,7 @@ JamStash.service('utils', function ($cookieStore, globals, model) {
if (suffix == 'ogg') { suffix = 'oga'; }
var salt = Math.floor(Math.random() * 100000);
url = globals.BaseURL() + '/stream.view?' + globals.BaseParams() + '&id=' + song.id + '&salt=' + salt;
return new model.Song(song.id, song.parent, track, title, song.artist, song.artistId, song.album, song.albumId, coverartthumb, coverartfull, song.duration, song.userRating, starred, suffix, specs, url, 0, description);
return new model.Song(song.id, song.parent, track, title, artist, song.artistId, song.album, song.albumId, coverartthumb, coverartfull, song.duration, song.userRating, starred, suffix, specs, url, 0, description);
};
this.confirmDelete = function (text) {
var question = confirm(text);