summaryrefslogtreecommitdiff
path: root/src/helsinki.at/rhimport/importer.go
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-12-13 23:16:59 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2015-12-13 23:16:59 (GMT)
commita39efd1c76e53cf7c09b899a9724c66fbcb01f00 (patch)
treea4cd4247fc542bcd07cb4ad85aa0dff7bb1e9b91 /src/helsinki.at/rhimport/importer.go
parentfc10a16a428ddfaaa4cd8d7455537590ecd49e7b (diff)
fetching show info works now
Diffstat (limited to 'src/helsinki.at/rhimport/importer.go')
-rw-r--r--src/helsinki.at/rhimport/importer.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/helsinki.at/rhimport/importer.go b/src/helsinki.at/rhimport/importer.go
index 8206082..9a254fc 100644
--- a/src/helsinki.at/rhimport/importer.go
+++ b/src/helsinki.at/rhimport/importer.go
@@ -155,7 +155,12 @@ func (ctx *ImportContext) getShowInfo() (err error) {
err = res.err
return
}
- rhdl.Printf("Title of show %d is '%s'", ctx.ShowId, res.title)
+
+ rhdl.Printf("Show %d:\n", ctx.ShowId)
+ rhdl.Printf(" Title: '%s'\n", res.title)
+ rhdl.Printf(" Normalization Level: %d\n", res.norm_lvl)
+ rhdl.Printf(" Autotrim Level: %d\n", res.trim_lvl)
+ rhdl.Printf(" Carts: %v\n", res.carts)
return
}
@@ -401,13 +406,10 @@ func import_audio(ctx *ImportContext, result *ImportResult) (err error) {
easy.Setopt(curl.OPT_PROGRESSDATA, ctx)
if err = easy.Perform(); err != nil {
+ err = fmt.Errorf("importer: %s", err)
return
}
- // var status_code interface{}
- // if status_code, err = easy.Getinfo(curl.INFO_RESPONSE_CODE); err != nil {
- // return
- // }
var rdres *RDWebResult
if rdres, err = NewRDWebResultFromXML(bufio.NewReader(&resbody)); err != nil {
return
@@ -459,7 +461,6 @@ func ImportFile(ctx *ImportContext) (res *ImportResult, err error) {
res.ErrorString = "Importing to shows using the show-id is not yet implemented"
// TODO: fetch info from dropboxes (cartlist, groupname, import-params)
// - if (ClearShowCarts == true): foreach(cart in cartlist): remove_cart(cart) [200 || 404 -> OK]
- // - ctx.cart = 0
// - add_cart(ctx, res) [200 -> OK]
// - add_cut(ctx, res) [200 -> OK]
// - import_audio(ctx, res) [200 -> OK]