Final merge for version 2025.07.16. If no problems will tag later today.
This commit is contained in:
@ -99,6 +99,13 @@ class command:
|
||||
"Progress detector checking: '" + text + "'", debug.DebugLevel.INFO
|
||||
)
|
||||
|
||||
# Filter out URLs to prevent false positives
|
||||
if self.contains_url(text):
|
||||
self.env["runtime"]["DebugManager"].write_debug_out(
|
||||
"Skipping progress detection - text contains URL", debug.DebugLevel.INFO
|
||||
)
|
||||
return
|
||||
|
||||
# Note: Auto-disable on 100% completion removed to respect user
|
||||
# settings
|
||||
|
||||
@ -151,8 +158,12 @@ class command:
|
||||
transfer_match = re.search(
|
||||
r"\d+\s+\d+[kMGT]?\s+\d+\s+\d+[kMGT]?.*?\d+\.\d+[kMGT].*?\d+:\d+:\d+", text
|
||||
)
|
||||
# Pattern 1f: Pacman-style transfer progress (flexible size/speed/time)
|
||||
pacman_match = re.search(
|
||||
r"\d+(?:\.\d+)?\s+[kKmMgGtT]iB\s+\d+(?:\.\d+)?\s+[kKmMgGtT]iB/s\s+\d+:\d+", text
|
||||
)
|
||||
|
||||
if time_match or token_match or dd_match or curl_match or transfer_match:
|
||||
if time_match or token_match or dd_match or curl_match or transfer_match or pacman_match:
|
||||
# For non-percentage progress, use a single activity beep every 2
|
||||
# seconds
|
||||
if (
|
||||
@ -354,5 +365,22 @@ class command:
|
||||
# If anything fails, assume it's not a prompt to be safe
|
||||
return False
|
||||
|
||||
def contains_url(self, text):
|
||||
"""Check if text contains URLs that might cause false progress detection"""
|
||||
import re
|
||||
|
||||
# Common URL patterns that might contain progress-like patterns
|
||||
url_patterns = [
|
||||
r"https?://[^\s]+", # http:// or https:// URLs
|
||||
r"ftp://[^\s]+", # ftp:// URLs
|
||||
r"www\.[^\s]+", # www. domains
|
||||
r"[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}[/\w.-]*", # domain.com/path patterns
|
||||
]
|
||||
|
||||
for pattern in url_patterns:
|
||||
if re.search(pattern, text, re.IGNORECASE):
|
||||
return True
|
||||
return False
|
||||
|
||||
def set_callback(self, callback):
|
||||
pass
|
||||
|
@ -4,5 +4,5 @@
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributors.
|
||||
|
||||
version = "2025.07.13"
|
||||
version = "2025.07.16"
|
||||
code_name = "master"
|
||||
|
Reference in New Issue
Block a user