mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-25 06:26:37 +00:00
Get back to a working state for tests
This commit is contained in:
parent
2ca1fb72e9
commit
a0e920f75c
@ -1120,7 +1120,7 @@ class Media(models.Model):
|
||||
epoch = self.get_metadata_first_value('epoch', arg_dict=data)
|
||||
migrated = dict(migrated=True, epoch=epoch)
|
||||
from common.utils import json_serial
|
||||
compact_json = json.dumps(migrated, separators=(',', ':'), default=json_serial)
|
||||
compact_json = json.dumps(data, separators=(',', ':'), default=json_serial)
|
||||
self.metadata = compact_json
|
||||
self.save()
|
||||
from common.logger import log
|
||||
@ -1179,12 +1179,14 @@ class Media(models.Model):
|
||||
data = json.loads(self.metadata or "{}")
|
||||
if not isinstance(data, dict):
|
||||
return {}
|
||||
data.update(
|
||||
new_data = data.copy()
|
||||
new_data.update(
|
||||
self.new_metadata.get_or_create(
|
||||
site=self.get_metadata_first_value('extractor_key', arg_dict=data),
|
||||
key=self.key,
|
||||
)[0].with_formats
|
||||
)
|
||||
log.debug(new_data)
|
||||
setattr(self, '_cached_metadata_dict', data)
|
||||
return data
|
||||
except Exception as e:
|
||||
|
Loading…
Reference in New Issue
Block a user