Added option to always clear the cache of the last track when another track starts to greatly reduce memory usage.

This commit is contained in:
The Wobbler 2025-01-25 18:29:27 +01:00
parent cba4fd67fa
commit dc46ac07bb
5 changed files with 38 additions and 1 deletions

View file

@ -45,6 +45,9 @@ class Player:
self.track_progress.start()
self.app.gui.on_track_change(previous_track, self.current_playlist.current_track)
if self.app.settings.clear_track_cache:
previous_track.clear_cache()
else:
self.stop()
@ -70,6 +73,9 @@ class Player:
self.track_progress.start()
self.app.gui.on_track_change(previous_track, self.current_playlist.current_track)
if self.app.settings.clear_track_cache:
previous_track.clear_cache()
def pause(self):
self.music_channel.pause()
self.track_progress.pause()