Skip to content

Bulk asynchronous downloader for multiple file hosts

refactor: reset log_output_text inside apprise

NTFSvolume1a9e7d0ee733
diff --git a/cyberdrop_dl/main.py b/cyberdrop_dl/main.py
index 9c22eb5a5..590f3e0a1 100644
--- a/cyberdrop_dl/main.py
+++ b/cyberdrop_dl/main.py
@@ -12,7 +12,7 @@ from cyberdrop_dl.ui.ui import program_ui
from cyberdrop_dl.utils.sorting import Sorter
from cyberdrop_dl.utils.utilities import check_latest_pypi, log_with_color, \
check_partials_and_empty_folders, log, log_spacer, send_webhook_message, \
- DEFAULT_CONSOLE_WIDTH, sent_appraise_notifications, set_log_output_text
+ DEFAULT_CONSOLE_WIDTH, sent_appraise_notifications
from cyberdrop_dl.managers.console_manager import print_
from cyberdrop_dl.clients.errors import InvalidYamlConfig
@@ -193,7 +193,6 @@ async def director(manager: Manager) -> None:
await send_webhook_message(manager)
await sent_appraise_notifications(manager)
- await set_log_output_text("")
diff --git a/cyberdrop_dl/utils/utilities.py b/cyberdrop_dl/utils/utilities.py
index cac2dfd1a..b1e600b27 100644
--- a/cyberdrop_dl/utils/utilities.py
+++ b/cyberdrop_dl/utils/utilities.py
@@ -350,6 +350,9 @@ async def check_latest_pypi(log_to_console: bool = True, call_from_ui: bool = Fa
async def sent_appraise_notifications(manager: Manager) -> None:
apprise_file = manager.path_manager.config_dir / manager.config_manager.loaded_config / 'apprise.txt'
+ text: Text = await get_log_output_text()
+ await set_log_output_text("")
+
if not apprise_file.is_file():
return
@@ -370,8 +373,7 @@ async def sent_appraise_notifications(manager: Manager) -> None:
tags = tags.split(',')
apprise_obj.add(url, tag = tags)
- text: Text = await get_log_output_text()
-
+
apprise_obj.notify(
body = text.plain,
title = 'Cyberdrop-DL',