refactor: remove core/ folder

This commit is contained in:
Vxrtrauter
2026-03-19 20:42:28 +01:00
parent 53d4a240a0
commit 325eda54fa
52 changed files with 142 additions and 142 deletions
+36
View File
@@ -0,0 +1,36 @@
from utils.network.download import run_download_direct, seed_magnet
from utils.logging.logs import consoleLog, remove_download_log
import os
def split_data(data):
count = data.count
downloads = data.data
return count, downloads
def check_completed(downloads, resume):
for download in downloads:
if download.completed == False:
consoleLog(f"Found unfinished download: {download.title}")
if resume == True:
if download.magnet_uri:
run_download_direct(download.magnet_uri, download.title)
consoleLog(f"Resuming Magnet: {download.title}")
elif download.url:
from network.direct_download import add_direct_download
add_direct_download(download.url, download.title)
consoleLog(f"Resuming Direct Download: {download.title}")
def check_downloads(downloads):
for download in downloads:
if download.completed == True and os.path.exists(download.path):
consoleLog(f"Existing Download: {download.title}")
try:
seed_magnet(download.magnet_uri, download.path)
except Exception as e:
consoleLog(f"Failed to seed {download.title}: {e}")
elif download.completed == True and not os.path.exists(download.path):
consoleLog(f"Inexistent Download: {download.title}")
remove_download_log(download.magnet_uri)