diff --git a/music_kraken/download/components.py b/music_kraken/download/components.py index e170e60..5aefdab 100644 --- a/music_kraken/download/components.py +++ b/music_kraken/download/components.py @@ -254,13 +254,13 @@ class DataObjectSelect(Select): def __iter__(self): source_types = list(sorted(self._source_type_to_data_objects.keys(), key=lambda x: x.name)) - has_limit = len(source_types) > 1 + single_source = len(source_types) > 1 for st in source_types: - if has_limit: + if single_source: yield self._source_type_to_option[st] - limit = min(15, len(self._source_type_to_data_objects[st])) if has_limit else len(self._source_type_to_data_objects[st]) + limit = min(15, len(self._source_type_to_data_objects[st])) if single_source else len(self._source_type_to_data_objects[st]) for i in range(limit): yield self._source_type_to_data_objects[st][i] \ No newline at end of file