Repository navigation
Conversation
A stored instance id names a Discogs collection entry of the old release. Keeping it after a rematch makes the Discogs check read it as a merge and offer to undo the rematch. Rematch edits the album in place, so the id is cleared on every item that uses that album, after the saves succeed.
With two copies on different pressings, Discogs moving one of them left the item matched to the other copy: the moved copy was reported as new and the missing one was not reported. A stored instance id that now sits on another release is checked first, unless another item has that release. Fixes Jeanball#69
A Discogs merge can combine different editions, so a merge is applied only when the user chose it: merged rows start unticked and "Apply all" adds new records only. The match label now says "same Discogs entry" rather than "confirmed", which read as a verified pressing.
The instance id was only stored by an apply, so a record that was never part of one had no exact link when Discogs merged its release, and a merge that changed the year was missed. A check now stores it too, for matched records without one, when exactly one record and one Discogs entry have the release. Apply follows the same rule instead of linking the earliest of several copies.
When the check cannot match a record, it now says what the record may be related to: a new look-alike release with another year (possible move), a release another record already has (possible duplicate), or one where Discogs has two copies (shared release). Flags change nothing. The new release of a possible move is added only when ticked by hand, and flags count in the notification.
Rematch rewrote the record's album entry in place. Every record sharing it, including other users', changed with it; an existing entry for the target release caused a false "already in your collection"; and the custom cover was deleted before the failing save. Rematch now finds or creates the target album, refuses only a real duplicate, points this record to it, and removes the old cover after the save. The instance id is cleared on this record only. Fixes Jeanball#72
With two copies, one of them moved, the other copy is new on a release the record is still on. With merges opt-in it started ticked while its merge did not, so the default apply skipped it as already in the collection. Such a row can now be ticked only with its merge and is left out of "Apply all". The merged hint no longer says the old release is gone from the collection.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A Discogs merge or a moved collection entry could be reported wrongly or lead to a duplicate record. Musivault now saves the link to each collection entry earlier, and flags what it cannot match for the user to decide. Rematch now changes only the chosen record.
Fixes #69
Fixes #71
Fixes #72
Changes
One commit per change:
New or changed text is in all 7 locales. The stored sync report gets an optional
flagsfield.How it was verified
npm run checkpasses: lint (0 errors), 371 backend and 211 frontend tests, both builds. The new tests were run before the change they cover and failed.Notes for review
Checklist
develop(notmain)fix(discogs): …CHANGELOG.mdunder## [Unreleased]npm run checkpasses (lint, tests and build, frontend and backend)frontend/src/locales/*/translation.json)backend/src/scripts/migration-runner.ts(none needed: the new report field is optional and filled by the next check)