Skip to content

Write the publisher role as rel on both sides of a publisher link #148

Description

@InTheMorning

MSP-2.0 writes both sides of a publisher link. generateRemoteItemXml writes each listed feed of a publisher feed, and generatePublisherXml writes the <podcast:publisher> reference of an album. The publish flow in src/utils/publisherPublish.ts adds that reference to each catalog feed, and PublishSection.tsx turns this option on by default. Thus each MSP publisher link is two-way. That is the best case for an index, because both feeds agree on the link.

No field holds the role of the publisher. An MSP feed cannot say if the publisher is the artist, a label, a network or a producer. An app that shows a publisher page must guess, and most apps show each publisher as an artist.

Change

  1. Add rel?: string to RemoteItem and to PublisherReference in src/types/feed.ts.
  2. src/utils/xmlParser.ts reads the rel attribute of each <podcast:remoteItem>, and of the remoteItem inside <podcast:publisher>. An imported feed then keeps its value.
  3. src/utils/xmlGenerator.ts writes rel="…" in generateRemoteItemXml and in generatePublisherXml when the field has a value. It writes no attribute when the field is empty.
  4. The publisher editor gets one control: "This publisher is: Not stated, Artist, Label". The default is "Not stated". The value applies to each catalog feed.
  5. The publish flow writes the same value into the PublisherReference of each catalog feed that it updates, so that the two sides agree.
  6. Tests: a round trip for each value, and a test that an empty value writes no attribute.

Example, a label

<!-- In the publisher feed -->
<podcast:remoteItem feedGuid="917393e3-1b1e-5cef-ace4-edaa54e1f810"
    feedUrl="https://example.com/album.xml" medium="music" rel="label" />

<!-- In the album feed -->
<podcast:publisher>
    <podcast:remoteItem medium="publisher" rel="label"
        feedGuid="003af0a0-6a45-55cf-b765-68e3d349551a"
        feedUrl="https://example.com/label.xml" />
</podcast:publisher>

MSP writes one role. The namespace discussion has not selected a separator for two roles, so this change does not need one.

Status of the attribute

rel on <podcast:remoteItem> is not in the specification yet. Kolomona proposed it in the namespace discussion on publisher feeds: #579, with the list of values in a later comment. The separator is still open there: a comma or a space.

Two music indexes read it now: v4vmusic.com and musicindex.org. Two feeds write it now: Sir Libre Records (rel="label") and Jimmy V (rel="artist" and rel="producer"). No client failure is known. MSP already writes the non-standard feedImg attribute for the same reason: a parser ignores an attribute that it does not know.

When the attribute is absent, the role is not stated. MSP writes no default value, so that an index does not show a guess as a fact.

I can send a pull request for this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions