Add Clear ISO button and organize output under ~/Videos/VideoTools/
This commit is contained in:
parent
1b4e504a57
commit
ad1da23c6c
|
|
@ -1474,7 +1474,7 @@ func authorDefaultOutputDir(outputType string) string {
|
||||||
if err != nil || home == "" {
|
if err != nil || home == "" {
|
||||||
home = "."
|
home = "."
|
||||||
}
|
}
|
||||||
dir := filepath.Join(home, "Videos")
|
dir := filepath.Join(home, "Videos", "VideoTools")
|
||||||
if strings.EqualFold(outputType, "iso") {
|
if strings.EqualFold(outputType, "iso") {
|
||||||
return filepath.Join(dir, "ISO_Convert")
|
return filepath.Join(dir, "ISO_Convert")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -226,6 +226,14 @@ func buildRipView(state *appState) fyne.CanvasObject {
|
||||||
state.persistRipConfig()
|
state.persistRipConfig()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
clearISOBtn := widget.NewButton("Clear ISO", func() {
|
||||||
|
state.ripSourcePath = ""
|
||||||
|
state.ripOutputPath = ""
|
||||||
|
sourceEntry.SetText("")
|
||||||
|
outputEntry.SetText("")
|
||||||
|
})
|
||||||
|
clearISOBtn.Importance = widget.LowImportance
|
||||||
|
|
||||||
controls := container.NewVBox(
|
controls := container.NewVBox(
|
||||||
widget.NewLabelWithStyle("Source", fyne.TextAlignLeading, fyne.TextStyle{Bold: true}),
|
widget.NewLabelWithStyle("Source", fyne.TextAlignLeading, fyne.TextStyle{Bold: true}),
|
||||||
ui.NewDroppable(sourceEntry, func(items []fyne.URI) {
|
ui.NewDroppable(sourceEntry, func(items []fyne.URI) {
|
||||||
|
|
@ -237,6 +245,7 @@ func buildRipView(state *appState) fyne.CanvasObject {
|
||||||
outputEntry.SetText(state.ripOutputPath)
|
outputEntry.SetText(state.ripOutputPath)
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
clearISOBtn,
|
||||||
widget.NewLabelWithStyle("Format", fyne.TextAlignLeading, fyne.TextStyle{Bold: true}),
|
widget.NewLabelWithStyle("Format", fyne.TextAlignLeading, fyne.TextStyle{Bold: true}),
|
||||||
formatSelect,
|
formatSelect,
|
||||||
widget.NewLabelWithStyle("Output", fyne.TextAlignLeading, fyne.TextStyle{Bold: true}),
|
widget.NewLabelWithStyle("Output", fyne.TextAlignLeading, fyne.TextStyle{Bold: true}),
|
||||||
|
|
@ -382,7 +391,7 @@ func defaultRipOutputPath(sourcePath, format string) string {
|
||||||
if err != nil || home == "" {
|
if err != nil || home == "" {
|
||||||
home = "."
|
home = "."
|
||||||
}
|
}
|
||||||
baseDir := filepath.Join(home, "Videos", "DVD_Rips")
|
baseDir := filepath.Join(home, "Videos", "VideoTools", "DVD_Rips")
|
||||||
name := strings.TrimSuffix(filepath.Base(sourcePath), filepath.Ext(sourcePath))
|
name := strings.TrimSuffix(filepath.Base(sourcePath), filepath.Ext(sourcePath))
|
||||||
if strings.EqualFold(name, "video_ts") {
|
if strings.EqualFold(name, "video_ts") {
|
||||||
name = filepath.Base(filepath.Dir(sourcePath))
|
name = filepath.Base(filepath.Dir(sourcePath))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user