fix: keep GIFs moving in reply contexts (v2.20.1)
Mastodon turns GIFs into silent looping MP4s (gifv); only the first-frame preview was kept. The MP4 is now saved locally and played muted and looping with the still as poster. Animated GIFs from other sites are saved as animated WebP. Migration 025 adds reply_contexts.video and has fediverse contexts with an image fetched again once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
03a1c8fcea
commit
952ca300c0
9 files changed
+193
-19
No files matched your search
+10
-2
@@ -233,6 +233,14 @@ def create_app(config=None):
|
||||
name = cached_preview(app.config.get('DATA_PATH', 'data'), url)
|
||||
return url_for('public.preview', name=name) if name else None
|
||||
|
||||
# Template filter - local copy of a replied-to post's gifv, or None (v2.20.1)
|
||||
@app.template_filter('local_video')
|
||||
def local_video_filter(url):
|
||||
from flask import url_for
|
||||
from starpunk.avatars import cached_video
|
||||
name = cached_video(app.config.get('DATA_PATH', 'data'), url)
|
||||
return url_for('public.preview', name=name) if name else None
|
||||
|
||||
# Template filter - URL to color for facepile (v1.6.0)
|
||||
@app.template_filter('url_to_color')
|
||||
def url_to_color_filter(url):
|
||||
@@ -476,5 +484,5 @@ def create_app(config=None):
|
||||
|
||||
# Package version (Semantic Versioning 2.0.0)
|
||||
# See docs/standards/versioning-strategy.md for details
|
||||
__version__ = "2.20.0"
|
||||
__version_info__ = (2, 20, 0)
|
||||
__version__ = "2.20.1"
|
||||
__version_info__ = (2, 20, 1)
|
||||
Reference in new issue
Block a user