- totInter = reduce(lambda a, b: a+b, histo.values())
- totInter = totInter - histo.get(0, 0)
- difficulty = int(round(float(coeffInter) / totInter, 0))
- metadata['difficulty'] = difficulty
+ metadata['duration'] = duration
+
+ # histo = song.intervalsHistogram
+ # coeffInter = reduce(lambda a, b : a + b,
+ # [abs(k) * v for k, v in histo.items()])
+ #
+ # totInter = reduce(lambda a, b: a+b, histo.values())
+ # totInter = totInter - histo.get(0, 0)
+ # difficulty = int(round(float(coeffInter) / totInter, 0))
+ # metadata['difficulty'] = difficulty