Skip to content

Commit

Permalink
support title for remote item
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanHirsch committed Sep 2, 2024
1 parent 36b9d79 commit 361a281
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/parser/phase/__test__/phase-6.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ describe("phase 6", () => {
<podcast:remoteItem itemGuid="https://podcastindex.org/podcast/4148683#1" feedGuid="a94f5cc9-8c58-55fc-91fe-a324087a655b" />
<podcast:remoteItem itemGuid="https://podcastindex.org/podcast/4148683#3" feedGuid="a94f5cc9-8c58-55fc-91fe-a324087a655b" />
<podcast:remoteItem itemGuid="tag:soundcloud,2010:tracks/319791095" feedGuid="a5ad6f3f-a279-504c-bc6a-30054e6b50e1" />
<podcast:remoteItem itemGuid="tag:soundcloud,2010:tracks/319789777" feedGuid="a5ad6f3f-a279-504c-bc6a-30054e6b50e1" />
<podcast:remoteItem itemGuid="tag:soundcloud,2010:tracks/319789777" feedGuid="a5ad6f3f-a279-504c-bc6a-30054e6b50e1" title="some title"/>
</channel>
</rss>`);

Expand All @@ -358,6 +358,7 @@ describe("phase 6", () => {
expect(third).toHaveProperty("feedGuid", "a5ad6f3f-a279-504c-bc6a-30054e6b50e1");
expect(fourth).toHaveProperty("itemGuid", "tag:soundcloud,2010:tracks/319789777");
expect(fourth).toHaveProperty("feedGuid", "a5ad6f3f-a279-504c-bc6a-30054e6b50e1");
expect(fourth).toHaveProperty("title", "some title");
expect(helpers.getPhaseSupport(result, phase)).toContain(supportedName);
});
});
Expand Down
2 changes: 2 additions & 0 deletions src/parser/phase/phase-6.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export type Phase6RemoteItem = {
itemGuid?: string;
feedUrl?: string;
medium?: Phase4Medium;
title?: string;
};

export const remoteItem = {
Expand All @@ -56,6 +57,7 @@ export const remoteItem = {
feedGuid: getKnownAttribute(n, "feedGuid"),
...extractOptionalStringAttribute(n, "itemGuid"),
...extractOptionalStringAttribute(n, "feedUrl"),
...extractOptionalStringAttribute(n, "title"),
...(getAttribute(n, "medium")
? { medium: lookup(Phase4Medium, getKnownAttribute(n, "medium")) }
: undefined),
Expand Down

0 comments on commit 361a281

Please sign in to comment.