zipseq needs to completely ignore Thumbs.db. It should be removed from any existing manifests. If the manifest is changed, but only Thumbs.db is changed (removed) it should not be rezipped.
---
_**Agent (model default, mode Agent)**_
---
Examining `zip_sequences.py` to understand how it handles manifests and files.
1.**`iter_sequence_files()`** — Skips `Thumbs.db` files during iteration, so they're never included in new states or archives.
2.**`load_state()`** — Removes any `Thumbs.db` entries from existing manifests when loading state files.
3.**`state_changed()`** — Filters out `Thumbs.db` entries from both states before comparison, so if the only change is removing `Thumbs.db`, it won't trigger a rezip.
Results:
-`Thumbs.db` files are ignored during scanning
- Existing manifests have `Thumbs.db` entries removed when loaded
- If a manifest change is only due to `Thumbs.db` removal, it won't trigger recompression
The `zip_sequence()` function automatically benefits from these changes since it uses `iter_sequence_files()`, which now filters out `Thumbs.db`.
No linting errors were found. The changes are ready to use.
Yes. `zipseq` scans multiple file types, not just PNG.
```45:52:zip_sequences.py
SEQUENCE_EXTENSIONS = {
".png",
".jpg",
".jpeg",
".tif",
".tiff",
".exr",
}
```
The `find_sequence_dirs()` function uses this set to identify sequence directories:
```491:491:zip_sequences.py
has_frames = any(Path(dirpath, f).suffix.lower() in SEQUENCE_EXTENSIONS for f in filenames)
```
Supported extensions:
-`.png`
-`.jpg`
-`.jpeg`
-`.tif`
-`.tiff`
-`.exr`
All of these are included in archives and tracked in manifests.
---
_**User (2025-12-29 17:37Z)**_
if there's a sequence with both jpg and png (by mistake) will it scan and compress both?
---
_**Agent (model default, mode Agent)**_
---
Yes. If a sequence directory contains both JPG and PNG files, both will be scanned and compressed.
How it works:
1.`find_sequence_dirs()` checks if a directory has any files matching `SEQUENCE_EXTENSIONS` (`.png`, `.jpg`, `.jpeg`, `.tif`, `.tiff`, `.exr`). If it finds any, it treats the directory as a sequence directory.
2. Once identified as a sequence directory, `iter_sequence_files()` includes all files in that directory (except `Thumbs.db` and archive paths), regardless of extension:
for dirpath, dirnames, filenames in os.walk(seq_dir):
path = Path(dirpath)
dirnames[:] = [d for d in dirnames if d not in ("_archive", "_CURRENT")]
if is_archive_path(path):
continue
for filename in filenames:
# Ignore Thumbs.db files completely
if filename.lower() == "thumbs.db":
continue
yield path / filename
```
So if a directory has both `frame_001.jpg` and `frame_001.png`, both will be:
- Included in the state manifest
- Compressed into the archive
The extension check only determines whether a directory is a sequence directory; it doesn't filter which files get included once it's identified as one.
---
_**User (2025-12-29 17:37Z)**_
I had one with jpgs that I removed so only the pngs remain, but the manifest isn't changing.
---
_**Agent (model default, mode Agent)**_
---
Checking the state comparison logic to see why the manifest isn't updating after removing JPGs:
<summary>Tool use: **codebase_search** • Searched codebase "How does the quick skip check work when directory mtime is older than archive?" • **14** results</summary>
| File | Lines |
|------|-------|
| `zip_sequences.py` | L981-1156 |
| `zip_sequences.py` | L979-1156 |
| `scripts_old/0MoveToCurrent.bat` | L61 |
| `zip_sequences.py` | L563-650 |
| `zip_sequences.py` | L471-513 |
| `zip_sequences.py` | L516-560 |
| `zip_sequences.py` | L1159-1286 |
| `zip_sequences.py` | L676-969 |
| `zip_sequences.py` | L861-969 |
| `zip_sequences.py` | L984-1286 |
| `UpdateSequences.ps1` | L54-96 |
| `zip_sequences.py` | L584-657 |
| `zip_sequences.py` | L861-976 |
| `zip_sequences.py` | L557-650 |
</details>
</tool-use>
---
---
The quick-skip optimization is likely the cause. It skips state computation if the directory mtime is <= the archive mtime, which can miss deletions when the directory mtime doesn't update. Checking the logic and making it more reliable:
The quick-skip optimization can miss file deletions when the directory mtime doesn't update. Adding a pre-check: if any files from the stored state are missing, we'll recompute the state instead of skipping.
<summary>Tool use: **read_lints** • Read lints for 1 file</summary>
Lint paths:
-`zip_sequences.py`
Lint results
**No lint errors found**
</details>
</tool-use>
---
---
Fixed the issue. The quick-skip optimization was skipping state computation when the directory mtime was <= the archive mtime, which can miss file deletions if the directory mtime doesn't update.
**The fix:** Before the quick-skip, the code now verifies that all files in the stored state still exist. If any are missing (like the JPGs you removed), it skips the quick-skip and recomputes the full state, which will detect the change and update the manifest.
Now when you run `zipseq`:
1. It checks if stored files still exist
2. If JPGs are missing, it recomputes the state
3. It detects the difference and updates the manifest
4. It recompresses the archive with only the remaining PNGs
The manifest should now update correctly when files are removed, even if the directory mtime doesn't change.