summaryrefslogtreecommitdiff
path: root/rhimport/core.go
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-07-22 16:45:12 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-07-22 16:45:12 (GMT)
commit405e7fa98878a61185d72f4bc5c9dede3f45f336 (patch)
tree6efa0f50f617be52cf4311e84e1f0bf7d0c1cd90 /rhimport/core.go
parent928b513a2b2be04babb9d2348ea5e28e1cb8bd7e (diff)
session can now haven an attached uploader .. needs testing
Diffstat (limited to 'rhimport/core.go')
-rw-r--r--rhimport/core.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/rhimport/core.go b/rhimport/core.go
index 9780485..f1bbe16 100644
--- a/rhimport/core.go
+++ b/rhimport/core.go
@@ -126,6 +126,11 @@ func getCBAApiKey() string {
return ""
}
+type AttachmentChunk struct {
+ Data []byte
+ Error error
+}
+
type Context struct {
conf *Config
db *rddb.DBChan
@@ -144,7 +149,7 @@ type Context struct {
AutotrimLevel int
UseMetaData bool
SourceUri string
- AttachmentChan <-chan []byte
+ AttachmentChan chan AttachmentChunk
FetchConverter string
OrigFilename string
Title string
@@ -175,7 +180,7 @@ func NewContext(conf *Config, db *rddb.DBChan) *Context {
ctx.NormalizationLevel = conf.ImportParamDefaults.NormalizationLevel
ctx.AutotrimLevel = conf.ImportParamDefaults.AutotrimLevel
ctx.UseMetaData = conf.ImportParamDefaults.UseMetaData
- ctx.AttachmentChan = nil
+ ctx.AttachmentChan = make(chan AttachmentChunk, 32)
ctx.FetchConverter = "ffmpeg-bs1770"
ctx.OrigFilename = ""
ctx.Title = ""