Configure basic file picking logic
This commit is contained in:
parent
9d11341a0c
commit
77593d250c
35
cmd/tune.go
35
cmd/tune.go
|
@ -2,14 +2,45 @@ package cmd
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
//"github.com/ebitengine/oto/v3"
|
||||
)
|
||||
|
||||
func tune() {
|
||||
fmt.Println("tune called")
|
||||
var (
|
||||
playIndividualFile bool = false
|
||||
filePath string = ""
|
||||
songToPlay Song
|
||||
|
||||
songList []Song
|
||||
)
|
||||
|
||||
type Song struct {
|
||||
Title string
|
||||
Path string
|
||||
}
|
||||
|
||||
func (s *Song) Play() {
|
||||
|
||||
}
|
||||
|
||||
func NewSong(p string) Song {
|
||||
newS := Song{}
|
||||
newS.Title = filepath.Base(p)
|
||||
newS.Path = p
|
||||
return newS
|
||||
}
|
||||
|
||||
func findFiles() {
|
||||
|
||||
}
|
||||
|
||||
func tune() {
|
||||
title := viper.Get("title")
|
||||
fmt.Println(title)
|
||||
if playIndividualFile == true {
|
||||
songToPlay = NewSong(filePath)
|
||||
}
|
||||
tui()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue