mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-24 05:56:37 +00:00
Add metadata_clear
function
This commit is contained in:
parent
92474f57c3
commit
34c8baa5ef
@ -1106,6 +1106,12 @@ class Media(models.Model):
|
||||
return self.metadata is not None
|
||||
|
||||
|
||||
def metadata_clear(self, /, *, save=False):
|
||||
self.metadata = None
|
||||
if save:
|
||||
self.save()
|
||||
|
||||
|
||||
def metadata_dumps(self, arg_dict=dict()):
|
||||
from common.utils import json_serial
|
||||
data = arg_dict or self.new_metadata.with_formats
|
||||
|
Loading…
Reference in New Issue
Block a user