Skip to content

Commit d5af824

Browse files
committed
1. Creates the full path to unnamed at start if it does not exist
2. Refresh info database after association of the metadata with the db files
1 parent 862ec81 commit d5af824

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

metadata_db_server.py

+7
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ def refresh():
119119
md = metadata_handler ( filename )
120120
md.associate_to_db(etho_db)
121121
md.save()
122+
meta_db.refresh_all_info()
122123
return {'success' : True, 'message' : 'Metadata succefully associated.' }
123124

124125

@@ -169,6 +170,12 @@ def close(exit_status=0):
169170
#DB_PATH points to the SQLlite db files. It can (should) be mounted as readonly as this never writes there
170171
#MD_PATH points to the metadata files. This will also contain the csv file with a summary of the SQLite dbs. Must be writable.
171172

173+
174+
try:
175+
os.makedirs(os.path.join (MD_PATH, "db/unnamed"))
176+
except FileExistsError:
177+
logging.info("The folder structure is correct.")
178+
172179
etho_db = db_organiser(DB_PATH, refresh=REFRESH_DB, csv_path=MD_PATH)
173180
meta_db = metadata_crawler(path=MD_PATH)
174181

0 commit comments

Comments
 (0)