feat(backup): add option to skip media download for some chats#74
feat(backup): add option to skip media download for some chats#74GeiserX merged 3 commits intoGeiserX:masterfrom
Conversation
|
Thanks for the PR! The skip logic looks solid, but there's a missing piece: When Requested change: When a chat is in This could run once at startup or at the beginning of each backup cycle — detect chats in the skip list that still have media records, delete the files, and clean up the DB rows. |
Thanks for the review! That's a great idea, any objections to making that an additional configuration (defaulting to TRUE)? Otherwise, I'll update the PR with that added. |
|
Merged! Thanks for the contribution @Farzadd, great feature and clean implementation. I'll push a follow-up commit to handle an edge case with media deduplication and then cut a v6.3.0 release including this. |
- Symlink removal no longer inflates freed-bytes count (only real file deletions count toward reclaimed storage) - Empty chat media directories are removed after cleanup - Session-level cache prevents redundant DB queries on subsequent backup cycles - Add 9 unit tests covering real files, symlinks, mixed scenarios, empty dirs, missing files, DB errors, and session cache Follows up on #74 (SKIP_MEDIA_CHAT_IDS feature)
Summary
For users with certain chats or groups that generate a lot of media, this option adds the ability to skip media download for those chats only
Type of Change
Database Changes
scripts/Data Consistency Checklist
chat_idvalues use marked format (via_get_marked_id())_strip_tz()before DB operationsTesting
python -m pytest tests/ -v)ruff check .)ruff format --check .)Security Checklist
Deployment Notes