Check if entry is valid before returning

This commit is contained in:
Christoph Stahl 2025-02-15 00:06:01 +01:00
parent 91dec5bcd9
commit 57fab12f4e

View file

@ -162,7 +162,7 @@ class Source(ABC):
return None
res: Result = Result.from_filename(ident, self.source_name)
return Entry(
entry = Entry(
ident=ident,
source=self.source_name,
duration=180,
@ -172,6 +172,9 @@ class Source(ABC):
performer=performer,
incomplete_data=True,
)
if not await self.is_valid(entry):
return None
return entry
async def search(self, query: str) -> list[Result]:
"""