Flutter-Bounty-Hunters / dart-rss

A dart package for parsing RSS & Atom feed
MIT License
23 stars 19 forks source link

Re-visit image parsing in liveItem #44

Open matthew-carroll opened 10 months ago

matthew-carroll commented 10 months ago

A liveItem element can have an images element like the following:

<podcast:images srcset="https://example.com/images/live/pci_avatar-massive.jpg 1500w,
        https://example.com/images/live/pci_avatar-middle.jpg 600w,
        https://example.com/images/live/pci_avatar-small.jpg 300w,
        https://example.com/images/live/pci_avatar-tiny.jpg 150w"
    />

This is currently being parsed in RssPodcastIndexLiveItemImages, but the parser produces a list of RegExp, not a list of strings. Moreover, it might be more appropriate to represent each image in a structured way, given that these image values contain a URL and possible width and height values.

Revisit this parser, fix it up, and consider add structured data in place of strings.

https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#live-item