Skip to content

Commit

Permalink
Test: Move Value Time Splits to Item
Browse files Browse the repository at this point in the history
  • Loading branch information
joksas committed Jan 14, 2025
1 parent e9bc280 commit 24f9ebf
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,30 +109,6 @@ func TestMarshal(t *testing.T) {
Split: 10,
},
},
ValueTimeSplits: []types.PodcastValueTimeSplit{
{
StartTime: types.DurationInteger(60 * time.Second),
Duration: types.DurationInteger(237 * time.Second),
RemoteItem: types.PodcastRemoteItem{
ItemGUID: pointer("https://podcastindex.org/podcast/4148683#1"),
FeedGUID: uuid.MustParse("a94f5cc9-8c58-55fc-91fe-a324087a655b"),
FeedURL: pointer("https://feeds.podcastindex.org/Album-TourconVII.xml"),
Medium: pointer(types.PodcastMediumMusic),
},
RemotePercentage: pointer[uint](95),
},
{
StartTime: types.DurationInteger(330 * time.Second),
Duration: types.DurationInteger(53 * time.Second),
RemoteItem: types.PodcastRemoteItem{
ItemGUID: pointer("https://podcastindex.org/podcast/4148683#3"),
FeedGUID: uuid.MustParse("a94f5cc9-8c58-55fc-91fe-a324087a655b"),
Medium: pointer(types.PodcastMediumMusic),
},
RemoteStartTime: pointer(types.DurationInteger(174 * time.Second)),
RemotePercentage: pointer[uint](95),
},
},
},
PodcastGUID: pointer(types.PodcastGUID("cda647ce-56b8-5d7c-9448-ba1993ab46b7")),
PodcastMedium: &types.PodcastMediumPodcast,
Expand Down Expand Up @@ -301,6 +277,30 @@ func TestMarshal(t *testing.T) {
Split: 10,
},
},
ValueTimeSplits: []types.PodcastValueTimeSplit{
{
StartTime: types.DurationInteger(60 * time.Second),
Duration: types.DurationInteger(237 * time.Second),
RemoteItem: types.PodcastRemoteItem{
ItemGUID: pointer("https://podcastindex.org/podcast/4148683#1"),
FeedGUID: uuid.MustParse("a94f5cc9-8c58-55fc-91fe-a324087a655b"),
FeedURL: pointer("https://feeds.podcastindex.org/Album-TourconVII.xml"),
Medium: pointer(types.PodcastMediumMusic),
},
RemotePercentage: pointer[uint](95),
},
{
StartTime: types.DurationInteger(330 * time.Second),
Duration: types.DurationInteger(53 * time.Second),
RemoteItem: types.PodcastRemoteItem{
ItemGUID: pointer("https://podcastindex.org/podcast/4148683#3"),
FeedGUID: uuid.MustParse("a94f5cc9-8c58-55fc-91fe-a324087a655b"),
Medium: pointer(types.PodcastMediumMusic),
},
RemoteStartTime: pointer(types.DurationInteger(174 * time.Second)),
RemotePercentage: pointer[uint](95),
},
},
},
PodcastSoundbites: []types.PodcastSoundbite{
{
Expand Down Expand Up @@ -465,12 +465,6 @@ func TestMarshal(t *testing.T) {
<podcast:valueRecipient name="Co-Host #1" type="node" address="02d5c1bf8b940dc9cadca86d1b0a3c37fbe39cee4c7e839e33bef9174531d27f52" split="50"></podcast:valueRecipient>
<podcast:valueRecipient name="Co-Host #2" type="node" address="032f4ffbbafffbe51726ad3c164a3d0d37ec27bc67b29a159b0f49ae8ac21b8508" split="40"></podcast:valueRecipient>
<podcast:valueRecipient name="Producer" type="node" address="03ae9f91a0cb8ff43840e3c322c4c61f019d8c1c3cea15a25cfc425ac605e61a4a" split="10"></podcast:valueRecipient>
<podcast:valueTimeSplit startTime="60" duration="237" remotePercentage="95">
<podcast:remoteItem itemGuid="https://podcastindex.org/podcast/4148683#1" feedGuid="a94f5cc9-8c58-55fc-91fe-a324087a655b" feedUrl="https://feeds.podcastindex.org/Album-TourconVII.xml" medium="music"></podcast:remoteItem>
</podcast:valueTimeSplit>
<podcast:valueTimeSplit startTime="330" duration="53" remoteStartTime="174" remotePercentage="95">
<podcast:remoteItem itemGuid="https://podcastindex.org/podcast/4148683#3" feedGuid="a94f5cc9-8c58-55fc-91fe-a324087a655b" medium="music"></podcast:remoteItem>
</podcast:valueTimeSplit>
</podcast:value>
<podcast:liveItem status="live" start="2021-09-10T02:07:30Z" end="2021-09-10T02:09:30Z">
<enclosure url="https://example.com/pc20/livestream?format=.mp3" length="312" type="audio/mpeg"></enclosure>
Expand Down Expand Up @@ -516,6 +510,12 @@ func TestMarshal(t *testing.T) {
<podcast:value type="lightning" method="keysend">
<podcast:valueRecipient name="Host" type="node" address="02d5c1bf8b940dc9cadca86d1b0a3c37fbe39cee4c7e839e33bef9174531d27f52" split="90"></podcast:valueRecipient>
<podcast:valueRecipient name="Producer" type="node" address="03ae9f91a0cb8ff43840e3c322c4c61f019d8c1c3cea15a25cfc425ac605e61a4a" split="10"></podcast:valueRecipient>
<podcast:valueTimeSplit startTime="60" duration="237" remotePercentage="95">
<podcast:remoteItem itemGuid="https://podcastindex.org/podcast/4148683#1" feedGuid="a94f5cc9-8c58-55fc-91fe-a324087a655b" feedUrl="https://feeds.podcastindex.org/Album-TourconVII.xml" medium="music"></podcast:remoteItem>
</podcast:valueTimeSplit>
<podcast:valueTimeSplit startTime="330" duration="53" remoteStartTime="174" remotePercentage="95">
<podcast:remoteItem itemGuid="https://podcastindex.org/podcast/4148683#3" feedGuid="a94f5cc9-8c58-55fc-91fe-a324087a655b" medium="music"></podcast:remoteItem>
</podcast:valueTimeSplit>
</podcast:value>
<psc:chapters version="1.2">
<psc:chapter start="00:00" title="Introduction"></psc:chapter>
Expand Down

0 comments on commit 24f9ebf

Please sign in to comment.