mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6900a5f9a3 | |||
| 1ffa1cacb9 | |||
| 207eb70f11 | |||
| 64144e5ed7 | |||
| d05fae7e87 | |||
| 9abdec6c33 | |||
| fb5eb61d05 | |||
| eff2164ecc | |||
| d8aa206ea2 | |||
| 6de74303ff | |||
| 5eb6314cb2 | |||
| 179dd0af83 | |||
| 365700900f | |||
| babbccdc9a | |||
| 367ffab86a | |||
| 71bad60617 | |||
| 27758f794c | |||
| d82afe8577 | |||
| 8592b3058e | |||
| 7a82e948b9 | |||
| 782b0b6bc9 | |||
| 64ca3c76a2 | |||
| d6302fc43f |
@@ -41,11 +41,11 @@ SoftwareManager is a Python-based GUI tool that simplifies searching and downloa
|
|||||||
|
|
||||||
<!-- python-dependencies:start -->
|
<!-- python-dependencies:start -->
|
||||||
```text
|
```text
|
||||||
requests (2.33.1)
|
requests (2.34.2)
|
||||||
PySide6-Essentials (6.11.0)
|
PySide6-Essentials (6.11.1)
|
||||||
beautifulsoup4 (4.14.3)
|
beautifulsoup4 (4.14.3)
|
||||||
darkdetect (0.7.1)
|
darkdetect (0.7.1)
|
||||||
pyinstaller (6.19.0)
|
pyinstaller (6.20.0)
|
||||||
PyQtDarkTheme-fork (2.3.6)
|
PyQtDarkTheme-fork (2.3.6)
|
||||||
plyer (2.1.0)
|
plyer (2.1.0)
|
||||||
psutil (7.2.2)
|
psutil (7.2.2)
|
||||||
|
|||||||
+4
-4
@@ -1,8 +1,8 @@
|
|||||||
requests==2.33.1
|
requests==2.34.2
|
||||||
PySide6-Essentials==6.11.0
|
PySide6-Essentials==6.11.1
|
||||||
beautifulsoup4==4.14.3
|
beautifulsoup4==4.15.0
|
||||||
darkdetect==0.7.1
|
darkdetect==0.7.1
|
||||||
pyinstaller==6.19.0
|
pyinstaller==6.20.0
|
||||||
PyQtDarkTheme-fork==2.3.6
|
PyQtDarkTheme-fork==2.3.6
|
||||||
plyer==2.1.0
|
plyer==2.1.0
|
||||||
psutil==7.2.2
|
psutil==7.2.2
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ class SteamripScraper:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
consoleLog(f"Found download link: {best}")
|
consoleLog(f"Found download link: {best}")
|
||||||
if "buzzheavier" in best:
|
if "buzzheavier" or "bzzhr" in best:
|
||||||
link = scrape_buzzheavier(best)
|
link = scrape_buzzheavier(best)
|
||||||
return link
|
return link
|
||||||
elif "gofile" in best:
|
elif "gofile" in best:
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import threading
|
|||||||
import webbrowser
|
import webbrowser
|
||||||
import subprocess
|
import subprocess
|
||||||
import platform
|
import platform
|
||||||
import time
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -20,12 +20,14 @@ def add_direct_download(url: str, title: str, dl_path: Optional[str] = None, hea
|
|||||||
consoleLog(f"Download already active: {title}")
|
consoleLog(f"Download already active: {title}")
|
||||||
return
|
return
|
||||||
|
|
||||||
filename = (
|
raw_filename = (
|
||||||
detect_filename_from_headers(url, DirectDownloadHandle.USER_AGENT)
|
detect_filename_from_headers(url, DirectDownloadHandle.USER_AGENT)
|
||||||
or extract_filename_from_url(url)
|
or extract_filename_from_url(url)
|
||||||
or sanitize_filename(title) + ".zip"
|
or sanitize_filename(title) + ".zip"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
filename = sanitize_filename(raw_filename)
|
||||||
|
|
||||||
handle = DirectDownloadHandle(url, filename, dl_path, headers, single_threaded)
|
handle = DirectDownloadHandle(url, filename, dl_path, headers, single_threaded)
|
||||||
with state.downloads_lock:
|
with state.downloads_lock:
|
||||||
state.active_downloads[url] = handle
|
state.active_downloads[url] = handle
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import requests
|
|||||||
import hashlib
|
import hashlib
|
||||||
import json
|
import json
|
||||||
import time
|
import time
|
||||||
|
import sys
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
@@ -231,8 +232,24 @@ class DirectDownloadHandle:
|
|||||||
def _preallocate_file(self, total_size: int):
|
def _preallocate_file(self, total_size: int):
|
||||||
if os.path.exists(self._file_path) and os.path.getsize(self._file_path) == total_size:
|
if os.path.exists(self._file_path) and os.path.getsize(self._file_path) == total_size:
|
||||||
return
|
return
|
||||||
|
|
||||||
with open(self._file_path, "wb") as f:
|
with open(self._file_path, "wb") as f:
|
||||||
f.truncate(total_size)
|
if sys.platform == "win32":
|
||||||
|
import msvcrt
|
||||||
|
import ctypes
|
||||||
|
from ctypes.wintypes import DWORD
|
||||||
|
|
||||||
|
handle = msvcrt.get_osfhandle(f.fileno())
|
||||||
|
kernel32 = ctypes.windll.kernel32
|
||||||
|
|
||||||
|
bytes_returned = DWORD()
|
||||||
|
kernel32.DeviceIoControl(
|
||||||
|
handle, 590020, None, 0, None, 0, ctypes.byref(bytes_returned), None
|
||||||
|
)
|
||||||
|
kernel32.SetFilePointerEx(handle, ctypes.c_int64(total_size), None, 0)
|
||||||
|
kernel32.SetEndOfFile(handle)
|
||||||
|
else:
|
||||||
|
f.truncate(total_size)
|
||||||
|
|
||||||
def _compute_chunks(self, total_size: int) -> list[ChunkSpec]:
|
def _compute_chunks(self, total_size: int) -> list[ChunkSpec]:
|
||||||
num_chunks = min(self.NUM_THREADS, max(1, total_size // self.MIN_CHUNK_SIZE))
|
num_chunks = min(self.NUM_THREADS, max(1, total_size // self.MIN_CHUNK_SIZE))
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ def detect_filename_from_headers(url: str, user_agent: str) -> Optional[str]:
|
|||||||
if "filename=" in cd:
|
if "filename=" in cd:
|
||||||
parts = cd.split("filename=")
|
parts = cd.split("filename=")
|
||||||
if len(parts) > 1:
|
if len(parts) > 1:
|
||||||
fname = parts[-1].strip().strip('"').strip("'")
|
fname = parts[1].split(";")[0].strip().strip('"').strip("'")
|
||||||
if fname:
|
if fname:
|
||||||
return fname
|
return fname
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ from PySide6.QtCore import QObject, QTimer
|
|||||||
from utils.data.state import state
|
from utils.data.state import state
|
||||||
from plyer import notification
|
from plyer import notification
|
||||||
import libtorrent as lt
|
import libtorrent as lt
|
||||||
import time
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user