Commit c1ca87b1 authored by David Trattnig's avatar David Trattnig
Browse files

Improved debugging.

parent adcd6751
......@@ -192,12 +192,14 @@ class FallbackManager:
# This should save used memory if the engine runs for a long time
if self.last_fallback < SimpleUtil.timestamp() - (60*60*24):
self.fallback_history = {}"Cleared fallback history.")
self.last_fallback = SimpleUtil.timestamp()
# Retrieve files which haven't been played yet
history = set(self.fallback_history.keys())
left_audio_files = list(set(audio_files).difference(history))
left_audio_files = list( set(audio_files) - (history) )"Left fallback audio-files: %d/%d" % (len(left_audio_files), len(audio_files)))
# If nothing left, clear history and start with all files again
if not len(left_audio_files):
self.fallback_history = {}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment