summaryrefslogtreecommitdiff
path: root/src/helsinki.at/rhimport/importer.go
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2015-12-14 14:48:37 (GMT)
committerChristian Pointner <equinox@helsinki.at>2015-12-14 14:48:37 (GMT)
commit97b905e99b95b6611d8d87bda90b56e47f2a5040 (patch)
tree0ec9f5c2b6c70b156e867ee770c31c42074a936c /src/helsinki.at/rhimport/importer.go
parent775a762b0c3d67d2ea19f288bec8c2ce857ec198 (diff)
fixed bug where some context values where not initialiized properly
Diffstat (limited to 'src/helsinki.at/rhimport/importer.go')
-rw-r--r--src/helsinki.at/rhimport/importer.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/helsinki.at/rhimport/importer.go b/src/helsinki.at/rhimport/importer.go
index 925722e..aa5343d 100644
--- a/src/helsinki.at/rhimport/importer.go
+++ b/src/helsinki.at/rhimport/importer.go
@@ -74,10 +74,10 @@ func NewImportContext(conf *Config, rddb *RdDb, user string) *ImportContext {
ctx.GroupName = ""
ctx.Cart = 0
ctx.Cut = 0
- ctx.Channels = 2
- ctx.NormalizationLevel = -12
- ctx.AutotrimLevel = 0
- ctx.UseMetaData = false
+ ctx.Channels = conf.ImportParamDefaults.Channels
+ ctx.NormalizationLevel = conf.ImportParamDefaults.NormalizationLevel
+ ctx.AutotrimLevel = conf.ImportParamDefaults.AutotrimLevel
+ ctx.UseMetaData = conf.ImportParamDefaults.UseMetaData
ctx.SourceFile = ""
ctx.DeleteSourceFile = false
ctx.DeleteSourceDir = false
@@ -158,6 +158,7 @@ func (ctx *ImportContext) getShowInfo() (carts []uint, err error) {
ctx.GroupName = res.group
ctx.NormalizationLevel = res.norm_lvl
ctx.AutotrimLevel = res.trim_lvl
+ ctx.Channels = 2
ctx.UseMetaData = true
carts = res.carts
return
@@ -188,6 +189,7 @@ func (ctx *ImportContext) getMusicInfo() (err error) {
}
ctx.NormalizationLevel = res.norm_lvl
ctx.AutotrimLevel = res.trim_lvl
+ ctx.Channels = 2
ctx.UseMetaData = true
return
}