diff --git a/backend/stream_providers.py b/backend/stream_providers.py index d8660d7..7bd3180 100755 --- a/backend/stream_providers.py +++ b/backend/stream_providers.py @@ -56,6 +56,8 @@ class StreamData(): return self.values.get("title") def description(self): return self.values.get("description") + def complete(self): + return None not in self.values.values() def meta(self): data = [] if isinstance(self.values.get("thumbnail"), str): @@ -204,6 +206,8 @@ async def get_any(upstream, proxy, logger): result.update("thumbnail", temp_result.thumbnail(), temp_result.override) result.update("title", temp_result.title(), temp_result.override) result.update("description", temp_result.description(), temp_result.override) + if result.complete(): + break for task in tasks: if not task.done(): task.cancel()