diff options
Diffstat (limited to 'src/pool-import')
-rw-r--r-- | src/pool-import/main.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/pool-import/main.go b/src/pool-import/main.go index a2c6cdb..a69c8cc 100644 --- a/src/pool-import/main.go +++ b/src/pool-import/main.go @@ -68,6 +68,12 @@ func main() { } defer sessions.Cleanup() + if ok, err := db.GetInterface().CheckMusicGroup(group); err != nil { + stdlog.Fatal("Error checking Pool Group:", err) + } else if !ok { + stdlog.Fatalf("Error '%s' is not a pool group", group) + } + c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGTERM) @@ -75,5 +81,14 @@ func main() { stdlog.Printf("*** will import into group '%s' from %d directories", group, len(directories)) stdlog.Println("***************************************************************") + carts, err := db.GetInterface().GetPoolCartList(rddb.PoolListEntry{Group: group}) + if err != nil { + stdlog.Fatal("Error fetching Pool Carts:", err) + } + + stdlog.Printf("got %d carts from pool:", len(carts)) + for _, cart := range carts { + stdlog.Printf(" %d: '%s' | %s / %s / %s)", cart.Number, cart.UserDefined, cart.Artist, cart.Album, cart.Title) + } <-c } |