mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 925fe21d03 | |||
| ec462afde6 | |||
| e50ef32c66 |
@@ -2,7 +2,6 @@ import requests
|
||||
from core.utils.data.state import state
|
||||
from core.utils.logging.logs import consoleLog
|
||||
|
||||
|
||||
def scrape_rutracker(query):
|
||||
search = requests.get(f"{state.api_url}/search?q={query}")
|
||||
consoleLog("Sent request to server")
|
||||
@@ -12,10 +11,9 @@ def scrape_rutracker(query):
|
||||
except Exception:
|
||||
consoleLog("No results found / No response from server")
|
||||
return None
|
||||
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
|
||||
# This function utilizes the SoftwareManager server - source code can be found under the "server" branch.
|
||||
# This function utilizes the SoftwareManager server - source code can be found under the SoftwareManager-Server repository.
|
||||
|
||||
@@ -32,7 +32,4 @@ def scrape_uztracker(query):
|
||||
|
||||
except requests.RequestException as e:
|
||||
consoleLog(f"Failed to fetch {search_url}: {e}")
|
||||
return None
|
||||
|
||||
|
||||
|
||||
return None
|
||||
@@ -19,7 +19,7 @@ def get_active_interfaces():
|
||||
for addr in addr_list:
|
||||
if addr.family == 2: # ipv4
|
||||
ipv4 = addr.address
|
||||
if not ipv4.startswith("127.") and not ipv4.startswith("169.254") and up == True:
|
||||
if not ipv4.startswith("127.") and not ipv4.startswith("169.254") and up:
|
||||
active.append(interface)
|
||||
consoleLog(f"Found Active: {interface}")
|
||||
|
||||
@@ -33,7 +33,7 @@ def list_interfaces() -> None:
|
||||
for addr in addr_list:
|
||||
if addr.family == 2: # ipv4
|
||||
ipv4 = addr.address
|
||||
if not ipv4.startswith("127.") and not ipv4.startswith("169.254") and up == True:
|
||||
if not ipv4.startswith("127.") and not ipv4.startswith("169.254") and up:
|
||||
status = "ACTIVE"
|
||||
else:
|
||||
status = "INACTIVE"
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
from core.utils.data.state import state
|
||||
from core.utils.logging.logs import consoleLog
|
||||
from core.utils.data.tracker import get_item_url
|
||||
from core.utils.data.tracker import get_magnet_link
|
||||
from core.network.libtorrent_wrapper import add_download
|
||||
from core.utils.general.wrappers import run_thread
|
||||
from core.utils.logging.logs import add_download_log
|
||||
import time
|
||||
|
||||
import threading
|
||||
|
||||
|
||||
@@ -26,7 +23,6 @@ def run_download(item, posts, post_titles):
|
||||
add_download_log(item, post_url, magnet_uri, False)
|
||||
|
||||
def run_download_direct(magnet_uri):
|
||||
add_download(magnet_uri)
|
||||
|
||||
|
||||
|
||||
consoleLog(f"Direct download: {magnet_uri[:60]}")
|
||||
add_download(magnet_uri)
|
||||
add_download_log("Direct Download", "", magnet_uri, False)
|
||||
Reference in New Issue
Block a user