mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-22 22:12:24 +01:00
Add images to feeds
This commit is contained in:
parent
19fa1d9b23
commit
31d5eb7e56
@ -60,6 +60,7 @@ def _get_new_packages_feed(feed_url: str) -> dict:
|
|||||||
"avatar": package.author.get_profile_pic_url(absolute=True),
|
"avatar": package.author.get_profile_pic_url(absolute=True),
|
||||||
"url": abs_url_for("users.profile", username=package.author.username),
|
"url": abs_url_for("users.profile", username=package.author.username),
|
||||||
},
|
},
|
||||||
|
"image": package.get_thumb_url(level=4, abs=True, format="png"),
|
||||||
"url": package.get_url("packages.view", absolute=True),
|
"url": package.get_url("packages.view", absolute=True),
|
||||||
"summary": package.short_desc,
|
"summary": package.short_desc,
|
||||||
"date_published": package.approved_at.isoformat(timespec="seconds") + "Z",
|
"date_published": package.approved_at.isoformat(timespec="seconds") + "Z",
|
||||||
@ -88,6 +89,7 @@ def _get_releases_feed(query, feed_url: str):
|
|||||||
"url": abs_url_for("users.profile", username=release.package.author.username),
|
"url": abs_url_for("users.profile", username=release.package.author.username),
|
||||||
},
|
},
|
||||||
"url": release.package.get_url("packages.view_release", id=release.id, absolute=True),
|
"url": release.package.get_url("packages.view_release", id=release.id, absolute=True),
|
||||||
|
"image": release.package.get_thumb_url(level=4, abs=True, format="png"),
|
||||||
"summary": release.summary,
|
"summary": release.summary,
|
||||||
"date_published": release.created_at.isoformat(timespec="seconds") + "Z",
|
"date_published": release.created_at.isoformat(timespec="seconds") + "Z",
|
||||||
"tags": ["release"],
|
"tags": ["release"],
|
||||||
|
Loading…
Reference in New Issue
Block a user