Sync from development - prepare for v0.5.0.3

This commit is contained in:
Omni
2026-03-23 13:46:27 +00:00
parent e52e1427f6
commit 8e4dd06f11
241 changed files with 713 additions and 441 deletions

View File

@@ -4,6 +4,7 @@ list of pending manual download items by lax filename comparison.
"""
import os
import re
import time
import logging
from dataclasses import dataclass, field
@@ -106,6 +107,14 @@ class DownloadWatcherService:
logger.debug(f"Candidate dot-normalized match: {path.name} -> {expected_name}")
self._debounce_and_emit(path, item)
return
# Some modlist metadata stores filenames with a leading numeric prefix
# (e.g. "1_filename.zip") that is absent from the browser-saved file.
for expected_name, item in self._pending_exact:
stripped = re.sub(r'^\d+_', '', expected_name)
if stripped != expected_name and stripped == candidate_name:
logger.debug(f"Candidate numeric-prefix match: {path.name} -> {expected_name}")
self._debounce_and_emit(path, item)
return
def _debounce_and_emit(self, path: Path, item: dict) -> None:
def _wait_and_emit():