mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-23 13:36:35 +00:00
Merge pull request #868 from tcely/patch-12
Some checks are pending
Run Django tests for TubeSync / test (3.10) (push) Waiting to run
Run Django tests for TubeSync / test (3.11) (push) Waiting to run
Run Django tests for TubeSync / test (3.12) (push) Waiting to run
Run Django tests for TubeSync / test (3.8) (push) Waiting to run
Run Django tests for TubeSync / test (3.9) (push) Waiting to run
Run Django tests for TubeSync / containerise (push) Blocked by required conditions
Some checks are pending
Run Django tests for TubeSync / test (3.10) (push) Waiting to run
Run Django tests for TubeSync / test (3.11) (push) Waiting to run
Run Django tests for TubeSync / test (3.12) (push) Waiting to run
Run Django tests for TubeSync / test (3.8) (push) Waiting to run
Run Django tests for TubeSync / test (3.9) (push) Waiting to run
Run Django tests for TubeSync / containerise (push) Blocked by required conditions
Use `Media.metadata_published` in `reduce_data`
This commit is contained in:
commit
f0ec22221e
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user