diff --git a/VERSION.md b/VERSION.md index 7918c7ab..12566ed7 100755 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -3.13.1 \ No newline at end of file +3.14.0 \ No newline at end of file diff --git a/src/js/services/mopidy/actions.js b/src/js/services/mopidy/actions.js index ee27782a..9dabb9f5 100755 --- a/src/js/services/mopidy/actions.js +++ b/src/js/services/mopidy/actions.js @@ -110,7 +110,9 @@ export function clearTracklist(){ } export function play(){ - return instruct('playback.play') + return { + type: 'MOPIDY_TRIGGER_PLAY' + } } export function pause(){ diff --git a/src/js/services/mopidy/middleware.js b/src/js/services/mopidy/middleware.js index ce281889..0247151e 100755 --- a/src/js/services/mopidy/middleware.js +++ b/src/js/services/mopidy/middleware.js @@ -274,6 +274,17 @@ const MopidyMiddleware = (function(){ * General playback **/ + case 'MOPIDY_TRIGGER_PLAY': + instruct(socket, store, 'playback.play'); + var data = { + type: 'notification', + notification_type: 'info', + content: store.getState().pusher.username +(store.getState().mopidy.play_state == 'paused' ? ' resumed' : ' started')+' playback', + icon: (store.getState().core.current_track ? helpers.getTrackIcon(store.getState().core.current_track, store.getState().core) : false) + } + store.dispatch(pusherActions.deliverBroadcast(data)); + break + case 'MOPIDY_PAUSE': var data = { type: 'notification',