[webpages] Handle title truncation better
This commit is contained in:
@ -150,8 +150,7 @@ class WebPage(ScrobblableMixin):
|
|||||||
|
|
||||||
if not self.title and self.extract:
|
if not self.title and self.extract:
|
||||||
first_line = self.extract.split("\n")[0]
|
first_line = self.extract.split("\n")[0]
|
||||||
if len(first_line) < 254:
|
self.title = first_line[:254]
|
||||||
self.title = first_line
|
|
||||||
|
|
||||||
if save:
|
if save:
|
||||||
self.save(update_fields=["title"])
|
self.save(update_fields=["title"])
|
||||||
|
|||||||
Reference in New Issue
Block a user