The only downloader you need. 下载器的集大成者。
TypeScript asyncasynciobittorentbtcross-platformdownload-managerdownloaderfluent-designftphttp3magnetpyqtpyside6pythonqtquicreactsoftwarestreaming
feat(task): 比对框接受 sha256sum 输出格式
XiaoYouChRbaff1141dc20
diff --git a/app/checksum.py b/app/checksum.pyindex 64d3a4be..d2b886d0 100644--- a/app/checksum.py+++ b/app/checksum.py@@ -29,5 +29,5 @@ def parseChecksum(text: str) -> str:def matchChecksum(checksums: dict[str, str], expected: str) -> str | None:- expected = expected.strip().lower()+ expected = parseChecksum(expected)return next((algorithm for algorithm, value in checksums.items() if value == expected), None)diff --git a/tests/test_checksum.py b/tests/test_checksum.pyindex 287cf167..9e79cfdf 100644--- a/tests/test_checksum.py+++ b/tests/test_checksum.py@@ -119,6 +119,9 @@ class TestMatchChecksum:def test_match_ignores_case_and_surrounding_spaces(self):assert matchChecksum({"md5": "aa11", "sha256": "bb22"}, " BB22\n") == "sha256"+ def test_sha256sum_line_matches(self):+ assert matchChecksum({"sha256": "bb22"}, "BB22 ubuntu.iso\n") == "sha256"+def test_mismatch_gives_none(self):assert matchChecksum({"md5": "aa11"}, "cc33") is None