Play/resume notification; Version bump

This commit is contained in:
James Barnsley
2018-02-26 07:56:20 +13:00
parent 536fead38d
commit dce75cf529
3 changed files with 15 additions and 2 deletions

View File

@ -1 +1 @@
3.13.1
3.14.0

View File

@ -110,7 +110,9 @@ export function clearTracklist(){
}
export function play(){
return instruct('playback.play')
return {
type: 'MOPIDY_TRIGGER_PLAY'
}
}
export function pause(){

View File

@ -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',