Parallax disabling for low-powered devices

This commit is contained in:
James Barnsley
2018-09-17 08:18:07 +12:00
parent cbdd2c4ad3
commit b5111b1840
17 changed files with 204 additions and 123 deletions

View File

@ -158,6 +158,7 @@ export default function reducer(core = {}, action){
**/
case 'PLAYLIST_TRACKS':
console.log(action)
var playlists = Object.assign({}, core.playlists)
var playlist = Object.assign({}, playlists[action.key], { tracks_uris: action.tracks_uris })

View File

@ -181,7 +181,7 @@ export function getTrack(uri){
var track = getState().core.tracks[uri];
if (!track.artists){
dispatch(coreActions.handleException(
"Could not get track",
"Could not get LastFM track",
{},
"Track has no artists"
));
@ -189,7 +189,7 @@ export function getTrack(uri){
}
} else {
dispatch(coreActions.handleException(
"Could not get track",
"Could not get LastFM track",
{},
"Could not find track in index"
));
@ -347,7 +347,7 @@ export function loveTrack(uri){
var track = getState().core.tracks[uri];
if (!track.artists){
dispatch(coreActions.handleException(
"Could not love track",
"Could not love LastFM track",
track,
"Track has no artists"
));
@ -355,7 +355,7 @@ export function loveTrack(uri){
}
} else {
dispatch(coreActions.handleException(
"Could not love track",
"Could not love LastFM track",
track,
"Could not find track in index"
));
@ -389,7 +389,7 @@ export function unloveTrack(uri){
var track = getState().core.tracks[uri];
if (!track.artists){
dispatch(coreActions.handleException(
"Could not unlove track",
"Could not unlove LastFM track",
track,
"Track has no artists"
));
@ -397,7 +397,7 @@ export function unloveTrack(uri){
}
} else {
dispatch(coreActions.handleException(
"Could not unlove track",
"Could not unlove LastFM track",
track,
"Could not find track in index"
));
@ -450,7 +450,7 @@ export function scrobble(track){
},
error => {
dispatch(coreActions.handleException(
'Could not scrobble track',
'Could not scrobble LastFM track',
error,
(error.description ? error.description : null)
));

View File

@ -1497,6 +1497,7 @@ const MopidyMiddleware = (function(){
request(socket, store, 'library.lookup', { uris: uris })
.then(response => {
console.log(response)
for(var uri in response){
if (response.hasOwnProperty(uri)){

View File

@ -114,9 +114,12 @@ const PusherMiddleware = (function(){
window.location.reload(true);
break;
case 'upgrading':
case 'upgrade_started':
store.dispatch(mopidyActions.upgrading());
store.dispatch(uiActions.createNotification({content: 'Upgrading...', type: 'info'}));
break;
case 'restarting':
store.dispatch(mopidyActions.restarting());
store.dispatch(uiActions.createNotification({content: 'Restarting...', type: 'info'}));
break;
}