mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-23 05:26:37 +00:00
Limit the metadata_title
string to fit in the title
column
This commit is contained in:
parent
b8f8d9d7fa
commit
488294475a
@ -935,7 +935,7 @@ class Media(models.Model):
|
||||
def save(self, force_insert=False, force_update=False, using=None, update_fields=None):
|
||||
# Trigger an update of derived fields from metadata
|
||||
if self.metadata:
|
||||
self.title = self.metadata_title
|
||||
self.title = self.metadata_title[:200]
|
||||
self.duration = self.metadata_duration
|
||||
if update_fields is not None and "metadata" in update_fields:
|
||||
# If only some fields are being updated, make sure we update title and duration if metadata changes
|
||||
|
Loading…
Reference in New Issue
Block a user