Show active direct conversion in stats and queue view
This commit is contained in:
parent
cf4f73e75e
commit
0fc122d17a
16
main.go
16
main.go
|
|
@ -207,6 +207,11 @@ func (s *appState) updateStatsBar() {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if s.convertBusy {
|
||||||
|
// Reflect direct conversion as an active job in the stats bar
|
||||||
|
running = 1
|
||||||
|
jobTitle = "Active conversion"
|
||||||
|
progress = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
s.statsBar.UpdateStats(running, pending, completed, failed, progress, jobTitle)
|
s.statsBar.UpdateStats(running, pending, completed, failed, progress, jobTitle)
|
||||||
|
|
@ -427,6 +432,17 @@ func (s *appState) showQueue() {
|
||||||
s.active = "queue"
|
s.active = "queue"
|
||||||
|
|
||||||
jobs := s.jobQueue.List()
|
jobs := s.jobQueue.List()
|
||||||
|
// If a direct conversion is running but not represented in the queue, surface it as a pseudo job.
|
||||||
|
if s.convertBusy {
|
||||||
|
jobs = append([]*queue.Job{{
|
||||||
|
ID: "active-convert",
|
||||||
|
Type: queue.JobTypeConvert,
|
||||||
|
Status: queue.JobStatusRunning,
|
||||||
|
Title: "Active conversion",
|
||||||
|
Description: fmt.Sprintf("Output: %s", s.convert.OutputFile()),
|
||||||
|
Progress: 0,
|
||||||
|
}}, jobs...)
|
||||||
|
}
|
||||||
|
|
||||||
view := ui.BuildQueueView(
|
view := ui.BuildQueueView(
|
||||||
jobs,
|
jobs,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user