Fixing the list of servers available not being persisted
This commit is contained in:
@ -436,8 +436,14 @@ const MopidyMiddleware = (function () {
|
||||
break;
|
||||
|
||||
case 'MOPIDY_UPDATE_SERVER':
|
||||
let servers = store.getState().mopidy.servers;
|
||||
servers[action.server.id] = { ...servers[action.server.id], ...action.server };
|
||||
const existingServers = store.getState().mopidy.servers;
|
||||
const servers = {
|
||||
...existingServers,
|
||||
[action.server.id]: {
|
||||
...existingServers[action.server.id] || {},
|
||||
...action.server,
|
||||
},
|
||||
};
|
||||
store.dispatch(mopidyActions.updateServers(servers));
|
||||
break;
|
||||
|
||||
|
||||
@ -177,21 +177,8 @@ const mopidyPersistConfig = {
|
||||
key: 'mopidy',
|
||||
storage: localForage,
|
||||
debug: window.test_mode,
|
||||
whitelist: [
|
||||
'consume',
|
||||
'current_server',
|
||||
'host',
|
||||
'port',
|
||||
'library_albums_uri',
|
||||
'library_artists_uri',
|
||||
'mute',
|
||||
'play_state',
|
||||
'random',
|
||||
'repeat',
|
||||
'servers',
|
||||
'ssl',
|
||||
'uri_schemes',
|
||||
'volume',
|
||||
blacklist: [
|
||||
'connected',
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user