Skip to content

Open the edit form right after adding a Discogs album - #65

Merged
Jeanball merged 9 commits into
Jeanball:developfrom
mikyjazz:italianstuff
Nov 25, 2026
Merged

Jeanball merged 9 commits into
Jeanball:developfrom
mikyjazz:italianstuff

Conversation

@mikyjazz

@mikyjazz mikyjazz commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adding a new Discogs album now opens its edit form straight away only when custom field definitions are configured, so they can be filled in before the record is filed away. With no custom fields, the album detail view is shown instead. This applies to all three add paths: a release page, a master version and the barcode scanner.
  • The album detail route is opened with an ?edit=discogs flag; the detail page consumes the flag on arrival so a reload or a later visit does not reopen the form. A failed custom-field lookup also falls back to the detail view. The add confirmation dialog (with condition grades) is unchanged, while the old "album added" choice dialog has been removed because navigation is now automatic.
  • Manual albums, CSV imports, the Discogs check/apply flow, rematching and refreshing an existing album are unaffected.
  • The Italian translation of the map service error has been aligned with the other six locales after merging develop.
  • Saving only custom field values no longer marks a Discogs album as locally modified and shows the "Restore Discogs data" button. Discogs uses none as a placeholder for a missing catalog number while the edit form shows an empty box; whitespace-only differences are now ignored in the comparison too.
  • A Spotify album link pasted into the search field can now be imported into the manual-add form. The backend uses Spotify's client-credentials flow to fetch the title, artist, release year, full tracklist and cover; the form is prefilled for review before saving. The cover is downloaded locally, and the album is stored as a manual album.
  • Spotify import is optional: set SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET to enable it. Without credentials the server answers with a clear 503 message. All seven locale files, the environment examples, both Docker Compose files and the README were updated.
  • Added an optional DISCOGS_PRICE_FALLBACK switch. When enabled, Musivault uses the release's cheapest current marketplace listing when Discogs price suggestions are unavailable (for example because the token holder has no seller settings). The fallback is stored in USD and applied to every condition grade; it is a market-floor estimate, not a grade-specific suggestion. Normal per-condition pricing stays the default and is unchanged when the switch is off. README, environment examples and both Compose files document the switch.
  • Stats and Collection now refresh their data when the page is opened. A background price sync can therefore be seen immediately in the total value and priced-record count instead of leaving the KPIs on the collection loaded earlier by the provider until the user switches tabs.

Testing

  • Frontend: 171 Vitest tests pass, production build succeeds, lint reports 0 errors (8 pre-existing warnings).
  • Backend: 209 Vitest tests pass, production build succeeds. New tests cover the fallback switch's boolean parsing, normal-mode behaviour, 404 and empty-suggestion fallback, missing listings and operation without a personal access token.
  • Verified in the local Docker stack rebuilt from docker-compose.dev.yml; frontend and backend containers are healthy and the MongoDB data is intact.
  • With the fallback enabled, the full price refresh priced 359 of 371 releases (12 found no listing and 11 items have no Discogs release ID). The collection value history now records 1436.72 USD for 359 items instead of 0.

Notes

@Jeanball
Jeanball merged commit 2e3d8dd into Jeanball:develop Nov 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants