Implement API call to set cue time.
This commit is contained in:
parent
c42737dae7
commit
844ad41721
2 changed files with 7 additions and 1 deletions
|
@ -227,6 +227,12 @@ export function loadPlaylistLibrary(libraryId: string): Promise<Track[]> {
|
|||
return myradioApiRequest("/playlist/" + libraryId + "/tracks", "GET", {});
|
||||
}
|
||||
|
||||
export function setTimeslotItemCue(timeslotItemId: string, secs: number): Promise<null> {
|
||||
return myradioApiRequest("/timeslotItem/" + timeslotItemId + "/cue", "PUT", {
|
||||
start_time: secs
|
||||
});
|
||||
}
|
||||
|
||||
export function setTrackIntro(trackId: number, secs: number): Promise<null> {
|
||||
return myradioApiRequest("/track/" + trackId + "/intro", "PUT", {
|
||||
duration: secs
|
||||
|
|
|
@ -78,7 +78,7 @@ const setTrackOutro = (trackid: number, secs: number, player: number): AppThunk
|
|||
|
||||
const setTrackCue = (timeslotItemId: string, secs: number, player: number): AppThunk => async (dispatch) => {
|
||||
try {
|
||||
//await api.setTimeslotItemCue(timeslotItemId, secs);
|
||||
await api.setTimeslotItemCue(timeslotItemId, secs);
|
||||
dispatch(MixerState.setLoadedItemCue(player, secs));
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
|
Loading…
Reference in a new issue