summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-12-28 23:42:17 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-12-28 23:42:17 (GMT)
commit385d29eb502bcaf514f29c67930f978bc969bd68 (patch)
treec630274f58c22b3567932bcc67e49d64c81b65b5 /src
parent972c2951d71bbb2e25e1d5aa8197921ada1997a1 (diff)
fetching pool cart list works
Diffstat (limited to 'src')
-rw-r--r--src/pool-import/main.go15
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
}