Fred808 commited on
Commit
f5b8f7e
·
verified ·
1 Parent(s): a59d051

Update cursor_tracker.py

Browse files
Files changed (1) hide show
  1. cursor_tracker.py +6 -6
cursor_tracker.py CHANGED
@@ -77,10 +77,10 @@ def log_message(message: str):
77
  if len(processing_status["logs"]) > 100:
78
  processing_status["logs"] = processing_status["logs"][-100:]
79
 
80
- # def log_failed_file(filename: str, error: str):
81
- # """Log failed files to persistent file"""
82
- # with open(FAILED_FILES_LOG, "a") as f:
83
- # f.write(f"{time.strftime("%Y-%m-%d %H:%M:%S")} - {filename}: {error}\n")
84
 
85
  def get_disk_usage(path: str) -> Dict[str, float]:
86
  """Get disk usage statistics in GB"""
@@ -189,7 +189,7 @@ def extract_with_retry(rar_path: str, output_dir: str, max_retries: int = 2) ->
189
  rar_path = first_part_path
190
  log_message(f"📦 Processing multi-part RAR starting with: {first_part}")
191
 
192
- for attempt in max_retries:
193
  try:
194
  # Test RAR first
195
  test_cmd = ["unrar", "t", rar_path]
@@ -228,7 +228,7 @@ def extract_with_retry(rar_path: str, output_dir: str, max_retries: int = 2) ->
228
  time.sleep(1)
229
 
230
  return False
231
-
232
  # --- Frame Extraction Utilities ---
233
  def ensure_dir(path):
234
  os.makedirs(path, exist_ok=True)
 
77
  if len(processing_status["logs"]) > 100:
78
  processing_status["logs"] = processing_status["logs"][-100:]
79
 
80
+ def log_failed_file(filename: str, error: str):
81
+ """Log failed files to persistent file"""
82
+ with open(FAILED_FILES_LOG, "a") as f:
83
+ f.write(f"{time.strftime('%Y-%m-%d %H:%M:%S')} - {filename}: {error}\n")
84
 
85
  def get_disk_usage(path: str) -> Dict[str, float]:
86
  """Get disk usage statistics in GB"""
 
189
  rar_path = first_part_path
190
  log_message(f"📦 Processing multi-part RAR starting with: {first_part}")
191
 
192
+ for attempt in range(max_retries):
193
  try:
194
  # Test RAR first
195
  test_cmd = ["unrar", "t", rar_path]
 
228
  time.sleep(1)
229
 
230
  return False
231
+
232
  # --- Frame Extraction Utilities ---
233
  def ensure_dir(path):
234
  os.makedirs(path, exist_ok=True)