Skip to content

Commit

Permalink
Fixing issue with Discover - wasn't implemented properly
Browse files Browse the repository at this point in the history
  • Loading branch information
jaedb committed Jan 20, 2016
1 parent 65d92b4 commit d8161d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/app/discover/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ angular.module('spotmop.discover', [])
// convert our echonest list into an array to get from spotify
var echonestArtists = [];
if( typeof(response.response) !== 'undefined' && typeof(response.response.artists) !== 'undefined')
response.response.artists;
echonestArtists = response.response.artists;

var artisturis = [];

Expand All @@ -139,8 +139,8 @@ angular.module('spotmop.discover', [])
});

SpotifyService.getArtists( artisturis )
.then( function( response ){
$scope.recommendations.suggestions = response.artists;
.then( function( spotifyArtists ){
$scope.recommendations.suggestions = spotifyArtists.artists;
});
}
});
Expand Down
5 changes: 3 additions & 2 deletions src/app/services/pusher/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
angular.module('spotmop.services.pusher', [
])

.factory("PusherService", function($rootScope, $http, $q, $localStorage, $cacheFactory, SettingsService, NotifyService){
.factory("PusherService", function($rootScope, $http, $q, $localStorage, $cacheFactory, $templateCache, SettingsService, NotifyService){

// make sure we have a local storage container
if( typeof( $localStorage.pusher ) === 'undefined' )
Expand Down Expand Up @@ -51,7 +51,8 @@ angular.module('spotmop.services.pusher', [
// detect if the core has been updated
if( SettingsService.getSetting('spotmopversion', 0) != data.version ){
NotifyService.notify('New version detected, clearing caches...');
$cacheFactory.get('$http').removeAll();
$cacheFactory.get('$http').removeAll();
$templateCache.removeAll();
SettingsService.setSetting('spotmopversion', data.version);
}

Expand Down

0 comments on commit d8161d9

Please sign in to comment.