Merging from diverged develop

This commit is contained in:
James Barnsley
2018-04-23 08:13:24 +12:00
parent 40dd3dc124
commit 957acd204f
5 changed files with 20 additions and 5 deletions

View File

@ -1,6 +1,10 @@
{
"name": "mopidy-iris",
<<<<<<< Updated upstream
"version": "3.17.1",
=======
"version": "3.17.0",
>>>>>>> Stashed changes
"description": "Mopidy HTTP interface",
"repository": "https://github.com/jaedb/iris",
"author": "James Barnsley <james@barnsley.nz>",

View File

@ -319,9 +319,18 @@ const CoreMiddleware = (function(){
tracks: [action.track]
});
// Set our window title to the track title
helpers.setWindowTitle(action.track, store.getState().mopidy.play_state);
next(action);
break;
case 'CLEAR_CURRENT_TRACK':
// Set our window title to the track title
helpers.setWindowTitle(null, store.getState().mopidy.play_state);
break;
case 'QUEUE_LOADED':
store.dispatch({
type: 'TRACKS_LOADED',

View File

@ -17,6 +17,12 @@ export default function reducer(core = {}, action){
current_track_uri: action.uri
});
case 'CLEAR_CURRENT_TRACK':
return Object.assign({}, core, {
current_track: null,
current_track_uri: null
});
case 'NEXT_TRACK_LOADED':
return Object.assign({}, core, {
next_track_uri: action.uri

View File

@ -204,9 +204,7 @@ export function getNextTrack(){
export function clearCurrentTrack(){
return {
type: 'CURRENT_TRACK_LOADED',
track: null,
uri: null
type: 'CLEAR_CURRENT_TRACK'
}
}

View File

@ -2037,8 +2037,6 @@ const MopidyMiddleware = (function(){
}
}
// Set our window title to the track title
helpers.setWindowTitle(track, store.getState().mopidy.play_state);
store.dispatch({
type: 'CURRENT_TRACK_LOADED',
track: track