print progress hook data if we are running in debug mode.
This commit is contained in:
parent
c367b7a5d3
commit
8dc17071ce
1 changed files with 9 additions and 0 deletions
|
|
@ -123,6 +123,15 @@ class Download:
|
||||||
self.logs = logs if logs else []
|
self.logs = logs if logs else []
|
||||||
|
|
||||||
def _progress_hook(self, data: dict):
|
def _progress_hook(self, data: dict):
|
||||||
|
if self.debug:
|
||||||
|
from copy import deepcopy
|
||||||
|
|
||||||
|
d_copy = deepcopy(data)
|
||||||
|
for k in ["formats", "thumbnails", "description", "tags", "_format_sort_fields"]:
|
||||||
|
d_copy["info_dict"].pop(k, None)
|
||||||
|
|
||||||
|
self.logger.debug(f"Progress hook: {d_copy}")
|
||||||
|
|
||||||
dataDict = {k: v for k, v in data.items() if k in self._ytdlp_fields}
|
dataDict = {k: v for k, v in data.items() if k in self._ytdlp_fields}
|
||||||
|
|
||||||
if "finished" == data.get("status") and data.get("info_dict", {}).get("filename", None):
|
if "finished" == data.get("status") and data.get("info_dict", {}).get("filename", None):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue