def frame_ranges_to_string(frames):
	"""
	Take a list of numbers and make a string representation of the ranges.

	>>> frame_ranges_to_string([1, 2, 3, 6, 7, 8, 9, 13, 15])
	'[1-3, 6-9, 13, 15]'

	:param list frames: Sorted list of frame numbers.
	:return: String of broken frame ranges (i.e '[10-14, 16, 20-25]').
	"""
	if not frames:
		return '[]'
	if not isinstance(frames, list):
		frames = list(frames)
	frames.sort()

	# Make list of lists for each consecutive range
	ranges = [[frames.pop(0)]]
	current_range_index = 0  # index of current range
	for x in frames:
		if x - 1 == ranges[current_range_index][-1]:
			ranges[current_range_index].append(x)
		else:
			current_range_index += 1
			ranges.append([x])
	range_strings = []
	for x in ranges:
		if len(x) > 1:
			range_strings.append('-'.join([str(x[0]), str(x[-1])]))
		else:
			range_strings.append(str(x[0]))
	complete_string = '[' + ', '.join(range_strings) + ']'
	return complete_string