Eagleget For Linux Link

@dataclass class DownloadTask: id: str url: str filename: str save_path: str total_size: int downloaded_size: int status: DownloadStatus threads: int speed: float created_at: datetime completed_at: Optional[datetime] md5: Optional[str]

def save_task(self, task: DownloadTask): conn = sqlite3.connect(self.db_path) cursor = conn.cursor() cursor.execute(''' INSERT OR REPLACE INTO downloads (id, url, filename, save_path, total_size, downloaded_size, status, threads, speed, created_at, completed_at, md5) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ''', ( task.id, task.url, task.filename, task.save_path, task.total_size, task.downloaded_size, task.status.value, task.threads, task.speed, task.created_at.isoformat(), task.completed_at.isoformat() if task.completed_at else None, task.md5 )) conn.commit() conn.close() eagleget for linux

def log_message(self, format, *args): pass # Suppress logging class BrowserIntegrationServer: def (self, port=8787): self.port = port self.server = None self.callback = None @dataclass class DownloadTask: id: str url: str filename:

class DownloadManager: def (self, db_path: str = "downloads.db"): self.db_path = db_path self.tasks: Dict[str, DownloadTask] = {} self.active_downloads: Dict[str, 'DownloadThread'] = {} self.queue = [] self.init_database() self.load_tasks() md5) VALUES (?

def refresh(self): self.layoutChanged.emit() class MainWindow(QMainWindow): def (self): super(). init () self.manager = DownloadManager() self.init_ui() self.timer = QTimer() self.timer.timeout.connect(self.update_progress) self.timer.start(1000)

To make sure you have the best possible experience on our site, we use cookies. By continuing to use this website, you consent to the use of cookies.
Learn more
To top