Configure basic file picking logic

This commit is contained in:
raul 2024-05-17 09:43:43 +02:00
parent 9d11341a0c
commit 77593d250c
1 changed files with 33 additions and 2 deletions

View File

@ -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()
}