Fix for TUI crash bug #487
This commit is contained in:
parent
4ae9443174
commit
727fec415c
|
@ -484,7 +484,8 @@ class StatusDetails(urwid.Pile):
|
||||||
yield self.image_widget(m["url"], aspect=aspect)
|
yield self.image_widget(m["url"], aspect=aspect)
|
||||||
yield urwid.Divider()
|
yield urwid.Divider()
|
||||||
# video media may include a preview URL, show that as a fallback
|
# video media may include a preview URL, show that as a fallback
|
||||||
elif m["preview_url"].lower().endswith(('.jpg', '.jpeg', '.png', '.gif', '.svg', '.webp')):
|
elif m["preview_url"]:
|
||||||
|
if m["preview_url"].lower().endswith(('.jpg', '.jpeg', '.png', '.gif', '.svg', '.webp')):
|
||||||
yield urwid.Text("")
|
yield urwid.Text("")
|
||||||
try:
|
try:
|
||||||
aspect = float(m["meta"]["small"]["aspect"])
|
aspect = float(m["meta"]["small"]["aspect"])
|
||||||
|
|
Loading…
Reference in New Issue