Do not overwrite existing metadata

This commit is contained in:
tcely authored and GitHub committed 2025-07-21 02:21:45 -04:00
1 parent edfbda7849
commit 821aa4608e
1 file changed
+1 -1
@@ -58,7 +58,7 @@ class Command(BaseCommand):
item.downloaded_filesize = Path(filepath).stat().st_size item.downloaded_filesize = Path(filepath).stat().st_size
# import .info.json file # import .info.json file
info_json = Path(filepath).with_suffix('.info.json') info_json = Path(filepath).with_suffix('.info.json')
if info_json.is_file(): if not item.has_metadata and info_json.is_file():
try: try:
item.ingest_metadata(json.loads(info_json.read_text())) item.ingest_metadata(json.loads(info_json.read_text()))
except: except: