feat(settings): configurable image types filter (issue #28 / DR-019) #42
No reviewers
Labels
No labels
Kind/Bug
Kind/Feature
Priority/High
Priority/Medium
Reviewed/Confirmed
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ai-collab/bulk-image-organizer!42
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "0.1.18/issue-28-image-types"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements the feature requested in #28: a global setting to toggle which supported image formats (JPEG, PNG, WEBP, TIFF, GIF, BMP) the application loads.
Summary of changes
PREF_ENABLED_IMAGE_EXTENSIONS) persisted in the application config DB.image_scanner.py,ScanWorker) now respects the enabled extensions subset (thesupported_extsparameter that had been a no-op is now wired through).delete_images_by_relative_paths+ImageListModel.remove_images, followed by singleton Dupe_ cleanup and viewer reconcile.VERSIONforms (e.g.0.1.18-feature.28) do not breakpip install -e, setuptools metadata, or builds (pyproject now uses theattrform;canonical_version()normalizes-→+for PEP 440 local version).User-visible
Versioning
0.1.19(patch from main base0.1.18).Testing & verification
Resolves #28.
Root cause: _prune_disabled_types_from_current_db (called unconditionally from open_directory for DR-019/image types) did 'r.get("relative_path")' on items from working_db.get_all_images() which returns list[ImageRecord] (dataclass), not dicts. AttributeError on any workspace with prior rows aborted open_directory before setWindowTitle / _launch_directory_scan / preload, so chooser closed with no visible effect or scan. - Made access robust with small _rp() helper (supports dict or record). - Also wrapped the bare delete in the live _on_image_types_changed path. - No behavior change for the filter itself; now open always reaches the visible 'this dir is open + scan' steps. Verification: ruff clean, pytest (scanner+config+shell), check-version, smoke-ui-exit all green.The committed VERSION file on development branches uses the documented form {base}-{kind}.{n} (per VERSIONING.md / AGENTS.md / DR-017) for branch naming and human tracking. However pyproject.toml used { file = "VERSION" } for dynamic version, and setuptools/pip editable installs + egg_info feed the raw string to packaging.version.Version, which strictly enforces PEP 440 and rejects the hyphenated dev suffix. - Make canonical_version() (the fallback path) always return a PEP 440 compliant string by turning the first '-' into '+' for the local version segment (0.1.18-feature.28 -> 0.1.18+feature.28). - Switch pyproject.toml dynamic version to { attr = "...canonical_version" } so that build isolation / editable installs go through our helper instead of the raw file. - Harden windows_file_version() against local version segments. - Update version tests and the test helper to assert the new contract (normalization happens; reported values remain parseable). This unblocks scripts/manual-build-windows.ps1 (and equivalent Linux build flows) on dev branches without changing the VERSION file contents or the documented development version policy. The isolated build venvs created by the PowerShell script will now succeed at the 'pip install -e .' step that previously died with 'InvalidVersion: 0.1.18-feature.28'.