Skip to content

Conversation

@imprologic
Copy link

Some Atom feeds, like the ones on YouTube, have the thumbnail image defined inside the media:group element, like below:

...
		<media:group>
			<media:title>Saifedean Ammous: How Bitcoin ENDS Inflation</media:title>
			<media:content url="https://www.youtube.com/v/SD6exDEZe3A?version=3" type="application/x-shockwave-flash" width="640" height="390"/>
			<media:thumbnail url="https://i4.ytimg.com/vi/SD6exDEZe3A/hqdefault.jpg" width="480" height="360"/>
			<media:description>Removed for brevity</media:description>
			<media:community>
				<media:starRating count="117" average="5.00" min="1" max="5"/>
				<media:statistics views="1078"/>
			</media:community>
		</media:group>
...

Because of this peculiarity, it's currently impossible for a webfeed user to get the thumbnail of a YouTube video.

This PR adds the following properties to the Group class:

  final Thumbnail? thumbnail;
  final Title? title;
  final Description? description;

The user can now call

item.media?.group?.thumbnail?.url

to get a YouTube thumbnail URL.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant