mirror of
https://github.com/calibrain/shelfmark.git
synced 2026-11-16 03:18:17 +00:00
fix(download): send every file of a multi-file download to the browser (#1489)
Download to Browser only ever sent the first file of a multi-file release (audiobook chapters, packs): the folder output returned final_paths[0] and /api/localdownload served that one path. The folder output now keeps every final path on the in-memory task (download_paths), and /api/localdownload streams them as one uncompressed ZIP named after the book when there is more than one. The archive is never staged on disk or held in memory, and ZIP64 covers large audiobooks. History still stores only the first path, so a re-download from history after a dismiss or restart serves a single file, as before. Also brings every linter back to green on all files: - pre-commit: bump the ruff hook to v0.17.1 to match uv.lock; ruff-format the Python examples in docs/dev and skills - ruff: fix the remaining issues in skills/shelfmark/download_books.py; format base_handler.py - basedpyright: Optional and attrs errors in databazeknih.py - knip: drop 31 unused exports, reuse ColumnColorHint in colorMaps - oxfmt 0.72: styles.css - direct download: fix the "Welib, mirrors" typo and the test that still expected the pre-OceanofPDF message Fixes #1467
This commit is contained in:
1 parent
3025f120eb
commit
10710abd4e
26 files changed
+664
-344
No files matched your search
@@ -343,6 +343,9 @@ def test_multifile_rename_ignores_template_even_with_original_name(tmp_path):
|
||||
files = sorted(path.name for path in ingest.glob("*.mp3"))
|
||||
assert files == ["Part 1 of 2.mp3", "Part 2 of 2.mp3"]
|
||||
assert all("RENAMED" not in name for name in files)
|
||||
# Browser download serves all of these, not just the returned first file.
|
||||
assert result in task.download_paths
|
||||
assert sorted(Path(path).name for path in task.download_paths) == files
|
||||
|
||||
|
||||
def test_torrent_hardlink_enabled_copy_fallback_does_not_extract_archives(tmp_path):
|
||||
|
||||
Reference in new issue
Block a user