summaryrefslogtreecommitdiff
path: root/src/helsinki.at/rhimport/importer.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/helsinki.at/rhimport/importer.go')
-rw-r--r--src/helsinki.at/rhimport/importer.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/helsinki.at/rhimport/importer.go b/src/helsinki.at/rhimport/importer.go
index 512daf6..1bfdf0c 100644
--- a/src/helsinki.at/rhimport/importer.go
+++ b/src/helsinki.at/rhimport/importer.go
@@ -516,6 +516,7 @@ func import_audio(ctx *ImportContext, res *ImportResult) (err error) {
if err = easy.Perform(); err != nil {
if res.ResponseCode == http.StatusNoContent {
+ rhl.Printf("import to cart/cat %d/%d got canceled", ctx.Cart, ctx.Cut)
res.Cart = ctx.Cart
res.Cut = ctx.Cut
err = nil
@@ -626,7 +627,7 @@ func cleanup_files(ctx *ImportContext) {
func ImportFile(ctx *ImportContext) (res *ImportResult, err error) {
defer cleanup_files(ctx)
- rhdl.Printf("importer: ImportFile called with: show-id: %d, pool-name: '%s', cart/cut: %d/%d", ctx.ShowId, ctx.GroupName, ctx.Cart, ctx.Cut)
+ rhl.Printf("importer: ImportFile called with: show-id: %d, pool-name: '%s', cart/cut: %d/%d", ctx.ShowId, ctx.GroupName, ctx.Cart, ctx.Cut)
if ctx.ProgressCallBack != nil {
ctx.ProgressCallBack(2, "importing", 0.0, ctx.ProgressCallBackData)
@@ -696,6 +697,7 @@ func ImportFile(ctx *ImportContext) (res *ImportResult, err error) {
return
}
if res.ResponseCode != http.StatusOK {
+ rhl.Printf("Fileimport has failed (Cart/Cut %d/%d): %s", res.Cart, res.Cut, res.ErrorString)
rmres := ImportResult{ResponseCode: http.StatusOK}
if rmCartOnErr {
if err = remove_cart(ctx, &rmres); err != nil {
@@ -706,10 +708,12 @@ func ImportFile(ctx *ImportContext) (res *ImportResult, err error) {
return
}
}
+ } else {
+ rhl.Printf("File got succesfully imported into Cart/Cut %d/%d", res.Cart, res.Cut)
}
} else {
res.ResponseCode = http.StatusBadRequest
- res.ErrorString = "The request doesn't contain enough information to be processed"
+ res.ErrorString = "importer: The request doesn't contain enough information to be processed"
}
return