summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-07-14 22:36:42 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-07-14 22:36:42 (GMT)
commit032ef2074e691935a017d95fa5fd134317ef344f (patch)
tree90b1882d09b9b4921b2b7b16e55c1636a6920158
parent82a53d6d2801a7b6c0dc0ea06172a26e9de9f39e (diff)
origfilename may not be available
-rw-r--r--rhimport/core.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/rhimport/core.go b/rhimport/core.go
index cc4671c..92e798b 100644
--- a/rhimport/core.go
+++ b/rhimport/core.go
@@ -250,5 +250,9 @@ func (ctx *Context) getMusicInfo() (err error) {
}
func (ctx *Context) updateCutCartTitle() (err error) {
- return ctx.db.UpdateCutCartTitle(ctx.Cart, ctx.Cut, ctx.GroupName, ctx.OrigFilename)
+ filename := ctx.OrigFilename
+ if filename == "" {
+ filename = ctx.SourceFile
+ }
+ return ctx.db.UpdateCutCartTitle(ctx.Cart, ctx.Cut, ctx.GroupName, filename)
}