Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
refactor: add check for resp serialization
NTFSvolume2a0daac57943
diff --git a/cyberdrop_dl/clients/response.py b/cyberdrop_dl/clients/response.pyindex 08a44560c..7deb9ba47 100644--- a/cyberdrop_dl/clients/response.py+++ b/cyberdrop_dl/clients/response.py@@ -73,6 +73,7 @@ class AbstractResponse(ABC, Generic[_ResponseT]):_text: str = EMPTY_CONTENT_cache: dict[str, Any] = dataclasses.field(init=False, compare=False, default_factory=dict)_lock: asyncio.Lock = dataclasses.field(init=False, compare=False, default_factory=asyncio.Lock)+ _serialized: bool = False_fully_serialized: bool = Falsecreated_at: datetime.datetime = dataclasses.field(init=False,@@ -99,7 +100,7 @@ class AbstractResponse(ABC, Generic[_ResponseT]):@final@propertydef has_content_not_logged(self) -> bool:- return not self._fully_serialized and self._text is not EMPTY_CONTENT+ return self._serialized and not self._fully_serialized and self._text is not EMPTY_CONTENTdef __json__(self) -> dict[str, Any]:try:@@ -108,6 +109,7 @@ class AbstractResponse(ABC, Generic[_ResponseT]):logger.exception("Unable to decode content of response %s", self.id)content = "<ERROR DECODING CONTENT>"+ self._serialized = Trueif content is EMPTY_CONTENT:content = "<DID NOT AWAIT FOR CONTENT YET>"else: