Metron-Project/metroninfo

Multiple sources

Buried-In-Code opened this issue · 7 comments

Currently MetronInfo only supports one source type.
A nice feature would be to expand the ID element to be a list of IDs so I can pull information from multiple sources and track what the issue ID is for each source.

<Sources>
  <Source location="Metron">123</Source>
  <Source location="Comicvine">456</Source>
</Sources>

A problem with this will be how do you know what id other objects (e.g. series) is from, 2 solutions I can think of are:

  1. Set the source location at each id object:
<Publisher id="12345" source="Metron">DC Comics</Publisher>
  1. Set a "primary" source location in the list of sources:
<Sources>
  <Source location="Metron" primary="True">123</Source>
  <Source location="Comicvine" primary="False">456</Source>
</Sources>

I thought about doing this, but I'm not 100% sure it's a good idea. I think the first solution is pretty much a non-starter, since it would definitely make things much messier to implement and frankly, seems to be over-engineered.

The second solution seems more reasonable, but still it would most likely only be used when a user is manually updating the MetronInfo file (since I think it's unlikely any automatic tagging software, like comictagger, would support using two sources to simultaneously write a tag) and I'm not sure if it's worth adding it for only that user-case.

Like I said earlier tho I'm still undecided, so it would be useful to get others opinion as to whether this is something worthwhile to add.

Another option could be creating a new object/list called External Links, that way looking at MetronInfo you still have what the source information is, but are able to have links to other sites/apis/ids

Moving some possible solutions from the Matrix room discussion to here.

First solution, add AlternativeIDs element:

<AlternativeIDs>
    <AlternativeID source="Comic Vine">9999</AlternativeID>
    <AlternativeID source="Grand Comics Database">1234</AlternativeID>
</AlternativeIDs>

Pros: Non-breaking change to the draft
Cons: An additional element that doesn't differ much from an existing element


Second Solution, modify the ID element currently in the draft as follows:

<ID>
    <Primary source="Metron">290431</Primary>
    <Alternative source="Comic Vine">123567</Alternative>
    <Alternative source="Grand Comics Database">9876</Alternative>
</ID>

Pros: One element to track all sources ID's
Cons: Breaks the current draft spec, which would affect folks who have implemented the existing draft (like Codex/ComicBox)

@Buried-In-Code After giving this some thought I'm leaning towards the 2nd solution in #19 (comment). What do you think?

If you're willing to go through a breaking change, I agree the 2nd solution is better, as you're still in a draft state a breaking change shouldn't be a big issue

@Buried-In-Code: I went ahead and created a PR on this (#30). If you could give a look and do a quick sanity check on it that'd be great. Thx.

Things look good, can't see any issues