add console logging in gui, remove progress bar from gui, add new logging function, refactor all print statements to use new log function

This commit is contained in:
Vxrtrauter
2026-01-14 11:27:22 +01:00
parent 9afced8a0b
commit a386269f29
15 changed files with 128 additions and 122 deletions
+4 -6
View File
@@ -1,4 +1,5 @@
from core.utils.data.state import state
from core.utils.general.logs import consoleLog
from core.utils.data.tracker import get_item_url
from core.utils.data.tracker import get_magnet_link
from core.network.aria2_wrapper import start_client
@@ -11,17 +12,14 @@ import threading
def download_selected(item, posts, post_titles):
if item is not None:
if state.debug:
print(f"Downloading {item.text()}")
consoleLog(f"Downloading {item.text()}")
run_thread(threading.Thread(target=run_download, args=(item.text(), posts, post_titles)))
else:
if state.debug:
print("No item selected for download.")
consoleLog("No item selected for download.")
def run_download(item, posts, post_titles):
post_url = get_item_url(item, posts, post_titles)
if state.debug:
print("Selected URL: ", post_url)
consoleLog(f"Selected URL: {post_url}")
magnet_uri = get_magnet_link(post_url)
start_client()
add_download_log(item, post_url, magnet_uri, False)