mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 09:59:41 +02:00
refactor: get_magnet to get_download_link
Rename scraper method get_magnet -> get_download_link in monkrus, rutracker and uztracker. Update downloader code to call .get_download_link and use the .is_magnet flag on tracker objects (replace dict access). Switch direct_download package imports to absolute paths and perform a small import reorder in direct_download/utils.py. These changes unify the download API and adapt call sites to the new tracker interface.
This commit is contained in:
@@ -3,8 +3,8 @@ from utils.data.state import state
|
||||
from typing import Optional
|
||||
|
||||
|
||||
from .handle import DirectDownloadHandle
|
||||
from .utils import (
|
||||
from network.direct_download.handle import DirectDownloadHandle
|
||||
from network.direct_download.utils import (
|
||||
sanitize_filename,
|
||||
extract_filename_from_url,
|
||||
detect_filename_from_headers,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from utils.logging.logs import consoleLog
|
||||
from urllib.parse import urlparse, unquote
|
||||
from utils.logging.logs import consoleLog
|
||||
from typing import Optional
|
||||
import requests
|
||||
import os
|
||||
|
||||
Reference in New Issue
Block a user