def update_metadata(self, snapshot, files, file_objects): record_metadata = True if not record_metadata: return # we don't need to update the metadata of secondary files, so ignore # icon and web metadata_files = [] metadata_file_objects = [] for file, file_object in zip(files, file_objects): file_type = file_object.get_value("type") if file_type in ['icon', 'web']: continue metadata_files.append(file) metadata_file_objects.append(file_object) search_type = snapshot.get_value("search_type") parser = SearchType.get(search_type).get_value("metadata_parser", no_exception=True) if parser: from metadata import CheckinMetadataHandler handler = CheckinMetadataHandler( snapshot=snapshot, files=metadata_files, file_objects=metadata_file_objects, commit=False, parser=parser) handler.execute()
def update_metadata(my, snapshot, files, file_objects): record_metadata = True if not record_metadata: return # we don't need to update the metadata of secondary files, so ignore # icon and web metadata_files = [] metadata_file_objects = [] for file, file_object in zip(files, file_objects): file_type = file_object.get_value("type") if file_type in ['icon', 'web']: continue metadata_files.append(file) metadata_file_objects.append(file_object) from metadata import CheckinMetadataHandler handler = CheckinMetadataHandler(snapshot=snapshot, files=metadata_files, file_objects=metadata_file_objects, commit=False) handler.execute()
def update_metadata(my, snapshot, files, file_objects): record_metadata = True if not record_metadata: return # we don't need to update the metadata of secondary files, so ignore # icon and web metadata_files = [] metadata_file_objects = [] for file, file_object in zip(files, file_objects): file_type = file_object.get_value("type") if file_type in ['icon', 'web']: continue metadata_files.append(file) metadata_file_objects.append(file_object) search_type = snapshot.get_value("search_type") parser = SearchType.get(search_type).get_value("metadata_parser", no_exception=True) if parser: from metadata import CheckinMetadataHandler handler = CheckinMetadataHandler(snapshot=snapshot, files=metadata_files, file_objects=metadata_file_objects, commit=False, parser=parser) handler.execute()