summaryrefslogtreecommitdiff
path: root/rhimport
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-07-08 15:34:21 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-07-08 15:34:21 (GMT)
commit5b0999d52e6030b404af0558fb0a7d9a36219db4 (patch)
tree41128d72abd2b87933c17ef09f82f8b076ed9c31 /rhimport
parentbfe8b6de150b9da1959b763530c5490cc6e5426c (diff)
added interface to update Cut and possible Cart title to rddb and importer
Diffstat (limited to 'rhimport')
-rw-r--r--rhimport/core.go4
-rw-r--r--rhimport/importer.go3
2 files changed, 7 insertions, 0 deletions
diff --git a/rhimport/core.go b/rhimport/core.go
index 29f03ba..fcc9584 100644
--- a/rhimport/core.go
+++ b/rhimport/core.go
@@ -244,3 +244,7 @@ func (ctx *Context) getMusicInfo() (err error) {
ctx.Cut = 0
return
}
+
+func (ctx *Context) updateCutCartTitle() (err error) {
+ return ctx.db.UpdateCutCartTitle(ctx.Cart, ctx.Cut, ctx.GroupName, ctx.SourceFile)
+}
diff --git a/rhimport/importer.go b/rhimport/importer.go
index 5ffeef5..e7eca56 100644
--- a/rhimport/importer.go
+++ b/rhimport/importer.go
@@ -528,6 +528,9 @@ func ImportFile(ctx *Context) (res *Result, err error) {
}
}
} else {
+ if err := ctx.updateCutCartTitle(); err != nil {
+ rhl.Printf("Warning: error while updating Cart/Cut Title: %v", err)
+ }
rhl.Printf("File got succesfully imported into Cart/Cut %d/%d", res.Cart, res.Cut)
}
} else {