updated panel display
This commit is contained in:
+2
-18
@@ -21,7 +21,7 @@ from pathlib import Path
|
||||
from urllib.parse import unquote, urlparse, parse_qs
|
||||
import logging
|
||||
|
||||
from SYS.logger import debug, is_debug_enabled, log
|
||||
from SYS.logger import debug, debug_panel, is_debug_enabled, log
|
||||
from SYS.models import DebugLogger, DownloadError, DownloadMediaResult, ProgressBar
|
||||
from SYS.utils import ensure_directory, sha256_file
|
||||
|
||||
@@ -80,23 +80,7 @@ class HTTPClient:
|
||||
def _debug_panel(self, title: str, rows: List[tuple[str, Any]]) -> None:
|
||||
if not is_debug_enabled():
|
||||
return
|
||||
try:
|
||||
from rich.table import Table as RichTable
|
||||
from rich.panel import Panel
|
||||
|
||||
grid = RichTable.grid(padding=(0, 1))
|
||||
grid.add_column("Key", style="cyan", no_wrap=True)
|
||||
grid.add_column("Value")
|
||||
for key, val in rows:
|
||||
try:
|
||||
grid.add_row(str(key), str(val))
|
||||
except Exception:
|
||||
grid.add_row(str(key), "<unprintable>")
|
||||
|
||||
debug(Panel(grid, title=title, expand=False))
|
||||
except Exception:
|
||||
# Fallback to simple debug output
|
||||
debug(title, rows)
|
||||
debug_panel(title, rows, border_style="bright_blue")
|
||||
|
||||
def __enter__(self):
|
||||
"""Context manager entry."""
|
||||
|
||||
@@ -425,7 +425,7 @@
|
||||
"(hexupload\\.net|hexload\\.com)/([a-zA-Z0-9]{12})"
|
||||
],
|
||||
"regexp": "(hexupload\\.net|hexload\\.com)/([a-zA-Z0-9]{12})",
|
||||
"status": true
|
||||
"status": false
|
||||
},
|
||||
"hot4share": {
|
||||
"name": "hot4share",
|
||||
@@ -482,7 +482,7 @@
|
||||
"(katfile\\.com/[0-9a-zA-Z]{12})"
|
||||
],
|
||||
"regexp": "(katfile\\.(cloud|online|vip)/([0-9a-zA-Z]{12}))|((katfile\\.com/[0-9a-zA-Z]{12}))",
|
||||
"status": true
|
||||
"status": false
|
||||
},
|
||||
"mediafire": {
|
||||
"name": "mediafire",
|
||||
@@ -595,7 +595,7 @@
|
||||
"(simfileshare\\.net/download/[0-9]+/)"
|
||||
],
|
||||
"regexp": "(simfileshare\\.net/download/[0-9]+/)",
|
||||
"status": true
|
||||
"status": false
|
||||
},
|
||||
"streamtape": {
|
||||
"name": "streamtape",
|
||||
@@ -690,7 +690,7 @@
|
||||
"uploadrar\\.(net|com)/([0-9a-z]{12})"
|
||||
],
|
||||
"regexp": "((get|cloud)\\.rahim-soft\\.com/([0-9a-z]{12}))|((fingau\\.com/([0-9a-z]{12})))|((tech|miui|cloud|flash)\\.getpczone\\.com/([0-9a-z]{12}))|(miui.rahim-soft\\.com/([0-9a-z]{12}))|(uploadrar\\.(net|com)/([0-9a-z]{12}))",
|
||||
"status": true,
|
||||
"status": false,
|
||||
"hardRedirect": [
|
||||
"uploadrar.com/([0-9a-zA-Z]{12})"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user