Skip to content

Commit d8161d9

Browse files
committed
Fixing issue with Discover - wasn't implemented properly
1 parent 65d92b4 commit d8161d9

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/app/discover/controller.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ angular.module('spotmop.discover', [])
123123
// convert our echonest list into an array to get from spotify
124124
var echonestArtists = [];
125125
if( typeof(response.response) !== 'undefined' && typeof(response.response.artists) !== 'undefined')
126-
response.response.artists;
126+
echonestArtists = response.response.artists;
127127

128128
var artisturis = [];
129129

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

141141
SpotifyService.getArtists( artisturis )
142-
.then( function( response ){
143-
$scope.recommendations.suggestions = response.artists;
142+
.then( function( spotifyArtists ){
143+
$scope.recommendations.suggestions = spotifyArtists.artists;
144144
});
145145
}
146146
});

src/app/services/pusher/service.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
angular.module('spotmop.services.pusher', [
44
])
55

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

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

0 commit comments

Comments
 (0)