def _length(obj, album):
 if album:
  return sum((i.length for i in obj.items()))
 else:
  return obj.length

def _length ( obj , album ) : if album : return sum ( ( i . length for i in obj . items ( ) ) ) else : return obj . length
get the duration of an item or album .