diff --git a/tubesync/sync/models.py b/tubesync/sync/models.py index 86aa4e10..a1e2846d 100644 --- a/tubesync/sync/models.py +++ b/tubesync/sync/models.py @@ -1018,7 +1018,7 @@ 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 = posix_epoch + timedelta(seconds=total_seconds) + ran_at = self.posix_epoch + timedelta(seconds=total_seconds) if (timezone.now() - ran_at) < timedelta(hours=1): return data @@ -1132,7 +1132,7 @@ class Media(models.Model): if timestamp is not None: try: timestamp_float = float(timestamp) - published_dt = posix_epoch + timedelta(seconds=timestamp_float) + published_dt = self.posix_epoch + timedelta(seconds=timestamp_float) except Exception as e: log.warn(f'Could not compute published from timestamp for: {self.source} / {self} with "{e}"') return published_dt