Clarify that an extractor's method can also return False if no valid data was found

pull/189/head
Patrick Robertson 2025-02-06 10:19:28 +01:00
rodzic 6ab8fd2ee4
commit a506f2a88f
1 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -95,5 +95,11 @@ class Extractor(BaseModule):
logger.warning(f"Failed to fetch the Media URL: {e}")
@abstractmethod
def download(self, item: Metadata) -> Metadata:
def download(self, item: Metadata) -> Metadata | False:
"""
Downloads the media from the given URL and returns a Metadata object with the downloaded media.
If the URL is not supported or the download fails, this method should return False.
"""
pass