DVinyl icon indicating copy to clipboard operation
DVinyl copied to clipboard

[Feature]: Editable provider ID on the edit form (generalise the Discogs ID block)

Open teaboyteaboy opened this issue 2 months ago • 1 comments

Before suggesting

  • [x] I searched the existing issues and did not find a similar request.

What problem would this solve?

When an item is linked to the wrong external record, or never matched one, there is currently no way to correct the link from the UI. "Refresh Info" only re-fetches the id already stored, so it cannot fix a wrong or missing match. The Music/Discogs plugin already exposes an editable discogs_id on its edit form; other provider-backed types (TMDB for movies, IGDB for games, etc.) have no equivalent.

How could it work?

Generalise the existing Discogs ID block to any plugin that declares an externalIdField. The edit form renders an editable input for that field, so the user can paste the correct id (e.g. the number from a themoviedb.org URL) and then use Refresh Info to re-pull the right record. Clearing the field unlinks the item.

One subtlety handled: the save path skips empty strings to protect the hidden-input flow, which would otherwise make "cleared to blank" indistinguishable from "not submitted". A small __externalId_present marker lets the save route tell the two apart, so a wrong link can actually be removed rather than silently kept.

The plugin's existing discogs_id block stays as-is; this only adds the generic block for plugins whose externalIdField is something else.

Alternatives you considered

Re-matching by re-import (heavy, and loses hand edits) or a DB edit (not user-facing). Making the id editable in place is the least surprising fix and reuses machinery the Discogs plugin already proves out.

Would you like to help build it?

I could open a PR for it

teaboyteaboy avatar Sep 25 '26 23:09 teaboyteaboy

Thanks for the write-up! Good news: this already landed in 3.1.5 (you're on 3.1.4). Any plugin with an externalIdField now gets an editable "Source ID" field on its edit form, not just Discogs. Paste the right id, save, then Refresh Info pulls the correct record. Clearing the field and saving unlinks the item, and the stored source pair goes with it, so a refresh can't bring the wrong match back.

Closing this one, but let me know if anything behaves differently once you've updated.

Kyonew avatar Sep 26 '26 10:09 Kyonew