Refresh history sidebar when jobs complete
This commit is contained in:
parent
a04c51a16b
commit
b2ae3ab02a
2
DONE.md
2
DONE.md
|
|
@ -768,6 +768,8 @@ This file tracks completed features, fixes, and milestones.
|
||||||
- ✅ Ranked benchmark results by score and added cancel confirmation
|
- ✅ Ranked benchmark results by score and added cancel confirmation
|
||||||
- ✅ Added estimated audio bitrate fallback when metadata is missing
|
- ✅ Added estimated audio bitrate fallback when metadata is missing
|
||||||
- ✅ Made target file size input unit-selectable with numeric-only entry
|
- ✅ Made target file size input unit-selectable with numeric-only entry
|
||||||
|
- ✅ Prevented snippet runaway bitrates when using Match Source Format
|
||||||
|
- ✅ History sidebar refreshes when jobs complete (snippet entries now appear)
|
||||||
- ✅ Stabilized video seeking and embedded rendering
|
- ✅ Stabilized video seeking and embedded rendering
|
||||||
- ✅ Improved player window positioning
|
- ✅ Improved player window positioning
|
||||||
- ✅ Fixed clear video functionality
|
- ✅ Fixed clear video functionality
|
||||||
|
|
|
||||||
1
TODO.md
1
TODO.md
|
|
@ -43,6 +43,7 @@ This file tracks upcoming features, improvements, and known issues.
|
||||||
- Lossless + Target Size mode support
|
- Lossless + Target Size mode support
|
||||||
- Audio bitrate estimation when metadata is missing
|
- Audio bitrate estimation when metadata is missing
|
||||||
- Target size unit selector and numeric entry
|
- Target size unit selector and numeric entry
|
||||||
|
- Snippet history updates in sidebar
|
||||||
|
|
||||||
## Priority Features for dev20+
|
## Priority Features for dev20+
|
||||||
|
|
||||||
|
|
|
||||||
67
main.go
67
main.go
|
|
@ -4089,27 +4089,48 @@ func (s *appState) executeSnippetJob(ctx context.Context, job *queue.Job, progre
|
||||||
args = append(args, "-b:a", "192k")
|
args = append(args, "-b:a", "192k")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// For non-WMV: use source codec or fallback to H.264
|
// For non-WMV: match source codec where possible, but cap bitrate for snippets
|
||||||
videoCodec := src.VideoCodec
|
videoCodec := strings.ToLower(strings.TrimSpace(src.VideoCodec))
|
||||||
if videoCodec == "" || strings.Contains(strings.ToLower(videoCodec), "wmv") {
|
switch {
|
||||||
|
case strings.Contains(videoCodec, "264"):
|
||||||
|
videoCodec = "libx264"
|
||||||
|
case strings.Contains(videoCodec, "265"), strings.Contains(videoCodec, "hevc"):
|
||||||
|
videoCodec = "libx265"
|
||||||
|
case strings.Contains(videoCodec, "vp9"):
|
||||||
|
videoCodec = "libvpx-vp9"
|
||||||
|
case strings.Contains(videoCodec, "av1"):
|
||||||
|
videoCodec = "libsvtav1"
|
||||||
|
default:
|
||||||
videoCodec = "libx264"
|
videoCodec = "libx264"
|
||||||
}
|
}
|
||||||
|
|
||||||
args = append(args, "-c:v", videoCodec)
|
args = append(args, "-c:v", videoCodec)
|
||||||
|
|
||||||
// Apply encoder preset if supported codec
|
preset := conv.EncoderPreset
|
||||||
if strings.Contains(strings.ToLower(videoCodec), "264") ||
|
if preset == "" {
|
||||||
strings.Contains(strings.ToLower(videoCodec), "265") {
|
preset = "slow"
|
||||||
if conv.EncoderPreset != "" {
|
}
|
||||||
args = append(args, "-preset", conv.EncoderPreset)
|
|
||||||
} else {
|
crfVal := conv.CRF
|
||||||
args = append(args, "-preset", "slow")
|
if crfVal == "" {
|
||||||
}
|
crfVal = "18"
|
||||||
if conv.CRF != "" {
|
}
|
||||||
args = append(args, "-crf", conv.CRF)
|
if strings.TrimSpace(crfVal) == "0" {
|
||||||
} else {
|
crfVal = "18"
|
||||||
args = append(args, "-crf", "18")
|
}
|
||||||
}
|
|
||||||
|
targetBitrate := clampSnippetBitrate(strings.TrimSpace(conv.VideoBitrate), src.Width)
|
||||||
|
if targetBitrate == "" {
|
||||||
|
targetBitrate = clampSnippetBitrate(defaultBitrate(conv.VideoCodec, src.Width, src.Bitrate), src.Width)
|
||||||
|
}
|
||||||
|
if targetBitrate == "" {
|
||||||
|
targetBitrate = clampSnippetBitrate("3500k", src.Width)
|
||||||
|
}
|
||||||
|
|
||||||
|
if strings.Contains(videoCodec, "x264") || strings.Contains(videoCodec, "x265") {
|
||||||
|
args = append(args, "-preset", preset, "-crf", crfVal, "-maxrate", targetBitrate, "-bufsize", targetBitrate)
|
||||||
|
} else if strings.Contains(videoCodec, "vp9") || strings.Contains(videoCodec, "av1") {
|
||||||
|
args = append(args, "-crf", crfVal, "-maxrate", targetBitrate, "-bufsize", targetBitrate)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Audio codec
|
// Audio codec
|
||||||
|
|
@ -4817,12 +4838,12 @@ func runGUI() {
|
||||||
// Adaptive window sizing for professional cross-resolution support
|
// Adaptive window sizing for professional cross-resolution support
|
||||||
w.SetFixedSize(false) // Allow manual resizing and maximizing
|
w.SetFixedSize(false) // Allow manual resizing and maximizing
|
||||||
|
|
||||||
// Use conservative default size that fits on small laptop screens (1280x768)
|
// Use compact default size (800x600) that fits on any screen
|
||||||
// Window can be maximized by user using window manager controls
|
// Window can be resized or maximized by user using window manager controls
|
||||||
w.Resize(fyne.NewSize(1200, 700))
|
w.Resize(fyne.NewSize(800, 600))
|
||||||
w.CenterOnScreen()
|
w.CenterOnScreen()
|
||||||
|
|
||||||
logging.Debug(logging.CatUI, "window initialized at 1200x700 (fits 1280x768+ screens), manual resizing enabled")
|
logging.Debug(logging.CatUI, "window initialized at 800x600 (compact default), manual resizing enabled")
|
||||||
|
|
||||||
state := &appState{
|
state := &appState{
|
||||||
window: w,
|
window: w,
|
||||||
|
|
@ -4907,6 +4928,7 @@ func runGUI() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
app.Driver().DoFromGoroutine(func() {
|
app.Driver().DoFromGoroutine(func() {
|
||||||
|
historyCount := len(state.historyEntries)
|
||||||
// Add completed jobs to history
|
// Add completed jobs to history
|
||||||
jobs := state.jobQueue.List()
|
jobs := state.jobQueue.List()
|
||||||
for _, job := range jobs {
|
for _, job := range jobs {
|
||||||
|
|
@ -4922,6 +4944,11 @@ func runGUI() {
|
||||||
if state.active == "queue" {
|
if state.active == "queue" {
|
||||||
state.refreshQueueView()
|
state.refreshQueueView()
|
||||||
}
|
}
|
||||||
|
if state.active == "mainmenu" && state.sidebarVisible && len(state.historyEntries) != historyCount {
|
||||||
|
state.navigationHistorySuppress = true
|
||||||
|
state.showMainMenu()
|
||||||
|
state.navigationHistorySuppress = false
|
||||||
|
}
|
||||||
}, false)
|
}, false)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user