From 83c669c24dce167c943bd91b9f63a46d4f5527a8 Mon Sep 17 00:00:00 2001 From: David Trattnig <david.trattnig@o94.at> Date: Fri, 16 Oct 2020 18:51:00 +0200 Subject: [PATCH] Event handlers after fallback calls. #43 --- modules/core/events.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/core/events.py b/modules/core/events.py index c8b982fb..356b6e50 100644 --- a/modules/core/events.py +++ b/modules/core/events.py @@ -210,6 +210,22 @@ class EngineEventDispatcher(): thread.start() + def on_fallback_updated(self, playlist_uri): + """ + Called when the scheduled fallback playlist has been updated. + """ + self.logger.debug("on_fallback_updated(..)") + self.call_event("on_fallback_updated", playlist_uri) + + + def on_fallback_cleaned(self, cleaned_channel): + """ + Called when the scheduled fallback queue has been cleaned up. + """ + self.logger.debug("on_fallback_cleaned(..)") + self.call_event("on_fallback_cleaned", cleaned_channel) + + def on_idle(self): """ Callend when no entry is playing -- GitLab