stop looking for data
This commit is contained in:
parent
c021da3441
commit
6ed8b6264e
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user