🚚 Move brainz to own package

This commit is contained in:
Dan Jones 2023-09-24 16:40:24 -05:00
commit 4c5c46a5f2
6 changed files with 42 additions and 34 deletions

View file

@ -4,7 +4,7 @@ import (
"fmt"
"codeberg.org/danjones000/strip-beats/media"
// "github.com/akrennmair/slice"
"codeberg.org/danjones000/strip-beats/media/brainz"
)
func print() {
@ -19,10 +19,10 @@ func print() {
if err != nil {
panic(err)
}
var recs []media.MbRecording
var recs []brainz.Recording
for _, res := range ids.Results {
for _, rec := range res.Recordings {
err = media.FillMbRecording(&rec)
err = brainz.FillRecording(&rec)
if err != nil {
panic(err)
}

View file

@ -6,6 +6,7 @@ import (
"codeberg.org/danjones000/strip-beats/input/boolean"
"codeberg.org/danjones000/strip-beats/media"
"codeberg.org/danjones000/strip-beats/media/brainz"
)
type AppStep int
@ -41,7 +42,7 @@ func testFp() {
func testMb() {
id := "497f2f22-809b-4c9e-a692-72f7d8dcaaa2"
mb, err := media.GetMbRecording(id)
mb, err := brainz.GetRecording(id)
if err != nil {
panic(err)
}
@ -57,7 +58,6 @@ func testPrint() {
}
func Run(step AppStep) {
// testMb()
testPrint()
for step < Quit {
switch step {