Esempio n. 1
0
def getBlitemFromRequest(key, value, labels):
		slug = key[3:]
		typex = key[:2]
		blitem = {}
		blitem['t'] = typex
		blitem['s'] = slug
		if BControl.isMultitext(typex):
			value = BControl.autoP(value)
		elif BControl.isMp3(typex):
			song = Song()
			song.load(value)
			value = song.dumpSong()
		elif BControl.isImage(typex):
			value = ObjectId(value)	

		blitem['v'] = value
		blitem['l'] = labels.get(slug)
		return blitem
Esempio n. 2
0
	def test_isMultitext(self):
		print 'Multitext: ' + str(BControl.MULTITEXT) + ' -' + BControl.getType(BControl.MULTITEXT) + ' - ' + str(BControl.isMultitext('02'))