2016-10-14 22:42:45 +13:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Actions and Action Creators
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
|
|
export function connect(){
|
|
|
|
|
return {
|
2016-10-16 12:37:37 +13:00
|
|
|
type: 'MOPIDY_CONNECT'
|
2016-10-14 22:42:45 +13:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function disconnect(){
|
|
|
|
|
return {
|
2016-10-16 12:37:37 +13:00
|
|
|
type: 'MOPIDY_DISCONNECT'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function changeTrack( tlid ){
|
|
|
|
|
return {
|
|
|
|
|
type: 'MOPIDY_CHANGE_TRACK',
|
|
|
|
|
call: 'playback.play',
|
|
|
|
|
value: { tlid: tlid }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function removeTracks( tlids ){
|
|
|
|
|
return {
|
|
|
|
|
type: 'MOPIDY_REMOVE_TRACKS',
|
|
|
|
|
call: 'tracklist.remove',
|
|
|
|
|
value: { tlid: tlids }
|
2016-10-14 22:42:45 +13:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function instruct( call, value ){
|
|
|
|
|
return {
|
2016-10-16 12:37:37 +13:00
|
|
|
type: 'MOPIDY_INSTRUCT',
|
2016-10-14 22:42:45 +13:00
|
|
|
call: call,
|
|
|
|
|
value: value
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|