[webpages] Handle title truncation better

This commit is contained in:
2025-03-07 14:36:35 -05:00
parent 760575e41d
commit 444562235f

View File

@ -150,8 +150,7 @@ class WebPage(ScrobblableMixin):
if not self.title and self.extract:
first_line = self.extract.split("\n")[0]
if len(first_line) < 254:
self.title = first_line
self.title = first_line[:254]
if save:
self.save(update_fields=["title"])