implemented the deletion of unnecesarry details in not chosen objects, for the sake of memory efficiency in the history
This commit is contained in:
@@ -167,7 +167,7 @@ class Shell:
|
||||
self.max_displayed_options = max_displayed_options
|
||||
self.option_digits: int = option_digits
|
||||
|
||||
self.current_results: Results = SearchResults
|
||||
self.current_results: Results = None
|
||||
self._result_history: List[Results] = []
|
||||
|
||||
self.genre = genre or get_genre()
|
||||
@@ -296,6 +296,9 @@ class Shell:
|
||||
page: Type[Page]
|
||||
music_object: DatabaseObject
|
||||
|
||||
if self.current_results is not None:
|
||||
self.current_results.delete_details(index)
|
||||
|
||||
try:
|
||||
page, music_object = self.current_results.get_music_object_by_index(index)
|
||||
except KeyError:
|
||||
|
Reference in New Issue
Block a user