Updated the title splicing length to 100 in playlist, category and media models (#1364)

This commit is contained in:
Meet Dholakia 2025-09-02 22:13:46 +05:30 committed by GitHub
parent e33aa17911
commit 6cee02085c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -138,7 +138,7 @@ class Tag(models.Model):
def save(self, *args, **kwargs): def save(self, *args, **kwargs):
self.title = helpers.get_alphanumeric_only(self.title) self.title = helpers.get_alphanumeric_only(self.title)
self.title = self.title[:99] self.title = self.title[:100]
super(Tag, self).save(*args, **kwargs) super(Tag, self).save(*args, **kwargs)
@property @property

View File

@ -245,7 +245,7 @@ class Media(models.Model):
strip_text_items = ["title", "description"] strip_text_items = ["title", "description"]
for item in strip_text_items: for item in strip_text_items:
setattr(self, item, strip_tags(getattr(self, item, None))) setattr(self, item, strip_tags(getattr(self, item, None)))
self.title = self.title[:99] self.title = self.title[:100]
# if thumbnail_time specified, keep up to single digit # if thumbnail_time specified, keep up to single digit
if self.thumbnail_time: if self.thumbnail_time:

View File

@ -64,7 +64,7 @@ class Playlist(models.Model):
strip_text_items = ["title", "description"] strip_text_items = ["title", "description"]
for item in strip_text_items: for item in strip_text_items:
setattr(self, item, strip_tags(getattr(self, item, None))) setattr(self, item, strip_tags(getattr(self, item, None)))
self.title = self.title[:99] self.title = self.title[:100]
if not self.friendly_token: if not self.friendly_token:
while True: while True: