🚧 Ask for next step
This commit is contained in:
parent
c941ed3302
commit
5472d7376a
5 changed files with 26 additions and 11 deletions
|
|
@ -3,11 +3,11 @@ package app
|
|||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
p "path"
|
||||
|
||||
"codeberg.org/danjones000/strip-beats/files"
|
||||
"codeberg.org/danjones000/strip-beats/input/boolean"
|
||||
"codeberg.org/danjones000/strip-beats/media"
|
||||
"codeberg.org/danjones000/strip-beats/utils"
|
||||
"github.com/rkoesters/xdg/trash"
|
||||
)
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ func PickFileWithConf() media.Probe {
|
|||
good := false
|
||||
for !good {
|
||||
path = files.PickRandomFile()
|
||||
msg = fmt.Sprintf("We've selected %s\nIs that ok?", getShortPath(path))
|
||||
msg = fmt.Sprintf("We've selected %s\nIs that ok?", utils.GetShortPath(path))
|
||||
good = boolean.Choose(msg)
|
||||
if !good {
|
||||
good = boolean.Choose("Would you like to quit?")
|
||||
|
|
@ -81,10 +81,3 @@ func Finish() {
|
|||
}
|
||||
PickAgain()
|
||||
}
|
||||
|
||||
func getShortPath(path string) string {
|
||||
base := p.Base(path)
|
||||
dir := p.Dir(path)
|
||||
dir = p.Base(dir)
|
||||
return fmt.Sprintf("%s/%s", dir, base)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue