implemented the deletion of unnecesarry details in not chosen objects, for the sake of memory efficiency in the history
This commit is contained in:
@@ -29,6 +29,13 @@ class Results:
|
||||
def get_music_object_by_index(self, index: int) -> Tuple[Type[Page], DatabaseObject]:
|
||||
# if this throws a key error, either the formated generator needs to be iterated, or the option doesn't exist.
|
||||
return self._page_by_index[index], self._by_index[index]
|
||||
|
||||
def delete_details(self, exclude_index: int):
|
||||
for index, music_object in self._by_index.items():
|
||||
if index == exclude_index:
|
||||
continue
|
||||
|
||||
music_object.strip_details()
|
||||
|
||||
|
||||
class SearchResults(Results):
|
||||
|
||||
Reference in New Issue
Block a user