Beispiel #1
0
def process_recorded_file_helper (user, request, filename, submityn):
	newfilename = convertaudio.convert_uploaded_file(filename)
	#TODO: For now it's easiest to call these three functions because they already
	#exist, but in the long term, it'll be more efficient to just create one row in the
	#database instead of creating, and updating it twice like I'm doing here.
	if newfilename:
		recordingid = db.store_recording(user, request, newfilename)
		discover_audiolength.discover_and_set_audiolength(recordingid, newfilename)
		if submityn == 'Y':
			db.submit_recording(recordingid)
		return recordingid
	else:
		raise RoundException("File not converted successfully: " + newfilename)
Beispiel #2
0
def submit_recording (form):
	return db.submit_recording(form['recordingid'])
Beispiel #3
0
def submit_recording (form):
	submityn = 'Y'
	if form.has_key('submityn'):
		submityn = form['submityn']
	return db.submit_recording(form['recordingid'], submityn)