Use Media.metadata_published

This commit is contained in:
tcely 2025-03-19 09:18:51 -04:00 committed by GitHub
parent 7f9b97dbc5
commit 13e7fc21a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1084,7 +1084,8 @@ class Media(models.Model):
data = json.loads(self.metadata or "{}")
if '_reduce_data_ran_at' in data.keys():
total_seconds = data['_reduce_data_ran_at']
ran_at = self.posix_epoch + timedelta(seconds=total_seconds)
assert isinstance(total_seconds, int), type(total_seconds)
ran_at = self.metadata_published(total_seconds)
if (now - ran_at) < timedelta(hours=1):
return data