mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-24 05:56:37 +00:00
Default to valid JSON
This prevents useless logged errors when there is no metadata available yet.
This commit is contained in:
parent
3130ff2816
commit
09ecbf210e
@ -1153,7 +1153,7 @@ class Media(models.Model):
|
|||||||
from common.utils import json_serial
|
from common.utils import json_serial
|
||||||
|
|
||||||
old_mdl = len(self.metadata or "")
|
old_mdl = len(self.metadata or "")
|
||||||
data = json.loads(self.metadata or "")
|
data = json.loads(self.metadata or "{}")
|
||||||
compact_json = json.dumps(data, separators=(',', ':'), default=json_serial)
|
compact_json = json.dumps(data, separators=(',', ':'), default=json_serial)
|
||||||
|
|
||||||
filtered_data = filter_response(data, True)
|
filtered_data = filter_response(data, True)
|
||||||
|
Loading…
Reference in New Issue
Block a user