File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -212,6 +212,13 @@ def __init__(self, resourceName):
212212 dataType = "integer" ,
213213 default = 50 ,
214214 )
215+ .param (
216+ "additive" ,
217+ "Additive Metadata, will add imported data to existing metadata" ,
218+ paramType = "formData" ,
219+ dataType = "boolean" ,
220+ default = False ,
221+ )
215222 )
216223 def process_metadata (
217224 self ,
@@ -223,14 +230,15 @@ def process_metadata(
223230 displayConfig ,
224231 ffprobeMetadata ,
225232 categoricalLimit ,
233+ additive
226234 ):
227235 # Process the current folder for the specified fileType using the matcher to generate DIVE_Metadata
228236 # make sure the folder is set to a DIVE Metadata folder using DIVE_METADATA = True
229237 user = self .getCurrentUser ()
230238 # Delete existing data if it is there already:
231239 rootQuery = {"root" : str (folder ["_id" ])}
232240 found = DIVE_Metadata ().findOne (query = rootQuery , user = user )
233- if found :
241+ if found and additive is not True :
234242 DIVE_Metadata ().removeWithQuery (rootQuery )
235243 DIVE_MetadataKeys ().removeWithQuery (rootQuery )
236244 rootFolder = Folder ().setMetadata (
You can’t perform that action at this time.
0 commit comments