Part 1 stopped existing full dates being destroyed; this adds first-class support for full release dates so they can be set + persisted instead of truncated to a year at the DB layer. - Schema: new nullable `release_date TEXT` on the albums table (idempotent ALTER-ADD-COLUMN repair on startup + the live CREATE). NULL = year-only, every reader falls back to albums.year, so it ships safe/dormant. - Tag writer: write_tags_to_file + build_tag_diff prefer db_data['release_date'] (the full date) over the year int; _date_to_write writes the full date. When there's no release_date it's exactly Part-1 behavior (year, preserving an equally-specific existing file date). - Retag read path: SELECT al.release_date in the tag-preview/write queries and thread it into _build_library_tag_db_data. - Manual edit: release_date added to ALBUM_EDITABLE_FIELDS + a "Release Date" field (YYYY-MM-DD, validated client-side) in the album editor; the artist-album query returns it so existing values show. User-set dates are authoritative. - Enrichment: Spotify + iTunes workers store the source's full release_date (YYYY-MM / YYYY-MM-DD) when present, only when empty — never clobbering a manual value. Tests: writer uses release_date over year + overrides an existing file date; falls back to year when absent; diff compares the full date. Migration verified idempotent + enrichment no-clobber. 1435 tag/retag/db/library tests pass. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| music_database.py | ||
| personalized_schema.py | ||