diff options
Diffstat (limited to 'www/js/importer.js')
-rw-r--r-- | www/js/importer.js | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/www/js/importer.js b/www/js/importer.js index c813f1a..8fae084 100644 --- a/www/js/importer.js +++ b/www/js/importer.js @@ -172,7 +172,7 @@ Rdxport.Importer.prototype.openModal = function(group, groupView, cartNumber, ne $('div.modal-body .drop', self.$el).css("background-image", "url('/img/audio_file.png')"); $('.modal-body #sourceUri', self.$el).val(''); $('#uploadModal-confirm', self.$el).off('click').on('click', function() { - var upload = new Rdxport.Upload(file, group, groupView, cartNumber, newCartNumber, useMetadata); + var upload = new Rdxport.Upload(file, group, groupView, cartNumber, useMetadata); upload.import(); self.uploads.push(upload); @@ -191,7 +191,7 @@ Rdxport.Importer.prototype.openModal = function(group, groupView, cartNumber, ne $('.modal-body .drop form input[type="file"]', this.$el).val(''); $('#uploadModal-confirm', self.$el).off('click').on('click', function() { var sourceUri = $('.modal-body #sourceUri', self.$el).val(); - var upload = new Rdxport.Upload(sourceUri, group, groupView, cartNumber, newCartNumber, useMetadata); + var upload = new Rdxport.Upload(sourceUri, group, groupView, cartNumber, useMetadata); upload.import(); self.uploads.push(upload); @@ -289,7 +289,7 @@ Rdxport.Importer.prototype.getUploadsByGroupName = function(groupName) { }); }; -Rdxport.Upload = function(fileOrsourceUri, group, groupView, cartNumber, newCartNumber, useMetadata) { +Rdxport.Upload = function(fileOrsourceUri, group, groupView, cartNumber, useMetadata) { this.sourceUri = ''; this.file = null; this.filename = ''; @@ -306,7 +306,7 @@ Rdxport.Upload = function(fileOrsourceUri, group, groupView, cartNumber, newCart this.group = group; this.groupView = groupView; this.cartNumber = cartNumber; - this.newCartNumber = newCartNumber; + this.newCartNumber = null; this.useMetadata = useMetadata; this.uploadId = null; @@ -413,22 +413,16 @@ Rdxport.Upload.prototype.import = function() { TIMEOUT: 7200, // 2 hours SOURCE_URI: self.sourceUri, CHANNELS: 2, - // todo: is this needed? - //NORMALIZATION_LEVEL: self.cart.normlevel, - //AUTOTRIM_LEVEL: self.cart.trimlevel, + NORMALIZATION_LEVEL: self.group.normlevel, + AUTOTRIM_LEVEL: self.group.trimlevel, USE_METADATA: self.useMetadata }; if (self.cartNumber) { sendOptions.REFERENCE_ID = self.group.groupName + '/' + self.cartNumber + '/' + self.filename; sendOptions.CART_NUMBER = parseInt(self.cartNumber); - } else { - if (self.newCartNumber) { - sendOptions.REFERENCE_ID = self.group.groupName + '/' + self.newCartNumber + '/' + self.filename; - sendOptions.CART_NUMBER = parseInt(self.newCartNumber); - } else if (self.group instanceof Rdxport.Musicpool) { + } else if (self.group instanceof Rdxport.Musicpool) { sendOptions.REFERENCE_ID = self.group.groupName + '/' + '/' + self.filename; sendOptions.MUSIC_POOL_GROUP = self.group.groupName; - } } console.log(sendOptions); this.send(JSON.stringify(sendOptions)); |