Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use gallery data for media order #38

Merged
merged 1 commit into from
May 12, 2022
Merged

Conversation

mnxn
Copy link
Contributor

@mnxn mnxn commented May 10, 2022

Fixes #34

Currently iterating over link.MediaMetadata is subject to Go's random iteration order for maps.

The Reddit JSON provides a gallery_data field with the actual order of media. With this PR, GetArticle will use the field to write the img elements. If the gallery_data field is missing, the old iteration order is used.

@vercel
Copy link

vercel bot commented May 10, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
reddit-rss ✅ Ready (Inspect) Visit Preview May 10, 2022 at 5:21AM (UTC)

@gitpod-io
Copy link

gitpod-io bot commented May 10, 2022

@trashhalo
Copy link
Owner

You are a hero! THANK YOU!

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.

Images in Reddit posts with multiple images are jumbled up
2 participants