Musicbrainz is out, Discogs is in

This commit is contained in:
James Barnsley
2019-09-05 15:18:16 +12:00
parent 6a7391d042
commit c55df548f1
17 changed files with 347 additions and 291 deletions

View File

@ -12,7 +12,7 @@ var spotifyActions = require('../spotify/actions.js');
var pusherActions = require('../pusher/actions.js');
var googleActions = require('../google/actions.js');
var lastfmActions = require('../lastfm/actions.js');
var musicbrainzActions = require('../musicbrainz/actions.js');
var discogsActions = require('../discogs/actions.js');
const MopidyMiddleware = (function(){
@ -2150,10 +2150,14 @@ const MopidyMiddleware = (function(){
store.dispatch(coreActions.artistLoaded(artist));
// Load supprting information from LastFM and Musicbrainz
// Load supprting information from LastFM and Discogs
var existing_artist = store.getState().core.artists[artist.uri];
if (existing_artist) {
if (!existing_artist.images) {
store.dispatch(discogsActions.getArtistImages(artist.uri, artist));
}
// Get biography and other stats from LastFM
if (!existing_artist.biography){
// TODO: Move this condition into lastfmActions