playlist timer pause/resume without affecting active feeds
This commit is contained in:
@@ -753,6 +753,21 @@ func main() {
|
||||
if cimgui.Button("Next##playlist") && !playlistRuntime.Next() {
|
||||
log.Print("playlist command queue is full")
|
||||
}
|
||||
if hasPlaylistSnapshot &&
|
||||
playlistSnapshot.State.HasSelection &&
|
||||
playlistSnapshot.Entry.Duration > 0 &&
|
||||
!playlistSnapshot.Timing.Expired {
|
||||
cimgui.SameLine()
|
||||
if playlistSnapshot.Timing.Paused {
|
||||
if cimgui.Button("Resume timer##playlist") &&
|
||||
!playlistRuntime.Resume() {
|
||||
log.Print("playlist command queue is full")
|
||||
}
|
||||
} else if cimgui.Button("Pause timer##playlist") &&
|
||||
!playlistRuntime.Pause() {
|
||||
log.Print("playlist command queue is full")
|
||||
}
|
||||
}
|
||||
|
||||
if hasPlaylistSnapshot && playlistSnapshot.State.HasSelection {
|
||||
entry := playlistSnapshot.Entry
|
||||
@@ -786,6 +801,17 @@ func main() {
|
||||
switch {
|
||||
case entry.Duration == 0:
|
||||
cimgui.Text("Timing: manual advance")
|
||||
case playlistSnapshot.Timing.Paused:
|
||||
fraction, remaining := playlistTimingProgress(
|
||||
playlistSnapshot.Timing,
|
||||
time.Now(),
|
||||
)
|
||||
cimgui.Text("Timing: paused")
|
||||
cimgui.ProgressBarV(
|
||||
fraction,
|
||||
cimgui.Vec2{X: -1, Y: 0},
|
||||
remaining.Round(time.Second).String(),
|
||||
)
|
||||
case playlistSnapshot.Timing.Started:
|
||||
fraction, remaining := playlistTimingProgress(
|
||||
playlistSnapshot.Timing,
|
||||
|
||||
Reference in New Issue
Block a user