mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b573ca8fed |
@@ -36,7 +36,7 @@ def init_session():
|
|||||||
settings["listen_interfaces"] = f"{interface_ip}:6881"
|
settings["listen_interfaces"] = f"{interface_ip}:6881"
|
||||||
consoleLog(f"Binding to Interface IP: {interface_ip}")
|
consoleLog(f"Binding to Interface IP: {interface_ip}")
|
||||||
else:
|
else:
|
||||||
consoleLog(f"Error finding IP for Interface {state.bound_interface}")
|
consoleLog(f"Skipping Binding, no Interface set. ({state.bound_interface})")
|
||||||
|
|
||||||
state.dl_session.apply_settings(settings)
|
state.dl_session.apply_settings(settings)
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ def add_download(magnet_uri, dl_path=state.download_path):
|
|||||||
init_session()
|
init_session()
|
||||||
|
|
||||||
if magnet_uri in state.active_downloads:
|
if magnet_uri in state.active_downloads:
|
||||||
consoleLog("Skipping, download already running...")
|
consoleLog("Skipping Downloading, download already running...")
|
||||||
return
|
return
|
||||||
|
|
||||||
magnetdl = lt.parse_magnet_uri(magnet_uri)
|
magnetdl = lt.parse_magnet_uri(magnet_uri)
|
||||||
@@ -114,7 +114,7 @@ def update_settings():
|
|||||||
settings["listen_interfaces"] = f"{interface_ip}:6881"
|
settings["listen_interfaces"] = f"{interface_ip}:6881"
|
||||||
consoleLog(f"Binding to Interface IP: {interface_ip}")
|
consoleLog(f"Binding to Interface IP: {interface_ip}")
|
||||||
else:
|
else:
|
||||||
consoleLog(f"Error finding IP for Interface {state.bound_interface}")
|
consoleLog(f"Skipping Binding, no Interface set. ({state.bound_interface})")
|
||||||
|
|
||||||
state.dl_session.apply_settings(settings)
|
state.dl_session.apply_settings(settings)
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,12 @@ def add_download_log(title, url, magnet_uri, completed) -> DownloadList:
|
|||||||
|
|
||||||
|
|
||||||
if any(d.magnet_uri == magnet_uri or d.url == url for d in downloads):
|
if any(d.magnet_uri == magnet_uri or d.url == url for d in downloads):
|
||||||
consoleLog("Skipped Logging, download already in file")
|
if magnet_uri in state.active_downloads:
|
||||||
|
consoleLog("Skipping Logging, download already running...")
|
||||||
|
return
|
||||||
|
consoleLog("File already in Log, updating Download State...")
|
||||||
|
hash = extract_hash_from_magnet(magnet_uri)
|
||||||
|
update_download_completed_by_hash(hash, False)
|
||||||
return DownloadList(data=downloads, count=len(downloads)) # thanks again claude (im stupid)
|
return DownloadList(data=downloads, count=len(downloads)) # thanks again claude (im stupid)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user