remove commands file
This commit is contained in:
parent
aa1efab569
commit
79308b7ac2
|
@ -1,23 +0,0 @@
|
|||
package tui
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"ewintr.nl/emdb/client"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
)
|
||||
|
||||
func FetchMovieList(emdb *client.EMDB, logger *Logger) tea.Cmd {
|
||||
return func() tea.Msg {
|
||||
logger.Log("fetching emdb movies...")
|
||||
ems, err := emdb.GetMovies()
|
||||
if err != nil {
|
||||
logger.Log(err.Error())
|
||||
}
|
||||
|
||||
//m.list.SetItems(items)
|
||||
logger.Log(fmt.Sprintf("found %d movies in in emdb", len(ems)))
|
||||
|
||||
return Movies(ems)
|
||||
}
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
package tui
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"ewintr.nl/emdb/client"
|
||||
"github.com/charmbracelet/bubbles/list"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
|
@ -59,3 +61,18 @@ func (m emdbTab) View() string {
|
|||
func (m *emdbTab) Log(s string) {
|
||||
m.logger.Log(s)
|
||||
}
|
||||
|
||||
func FetchMovieList(emdb *client.EMDB, logger *Logger) tea.Cmd {
|
||||
return func() tea.Msg {
|
||||
logger.Log("fetching emdb movies...")
|
||||
ems, err := emdb.GetMovies()
|
||||
if err != nil {
|
||||
logger.Log(err.Error())
|
||||
}
|
||||
|
||||
//m.list.SetItems(items)
|
||||
logger.Log(fmt.Sprintf("found %d movies in in emdb", len(ems)))
|
||||
|
||||
return Movies(ems)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue