Skip to content

Instantly share code, notes, and snippets.

@TheQwertiest
Created July 1, 2019 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheQwertiest/e08460f6da620107ddf4fad38d5b9dc8 to your computer and use it in GitHub Desktop.
Save TheQwertiest/e08460f6da620107ddf4fad38d5b9dc8 to your computer and use it in GitHub Desktop.
void ChangeSingleTagValue(metadb_handle_ptr handle, const wchar_t* tagName, const wchar_t* tagValue)
{
file_info_impl fileInfo;
handle->get_info( fileInfo );
fileInfo.meta_remove_field( tagName );
fileInfo.meta_set( tagName, tagValue );
metadb_handle_list handleList;
handleList.add_item( handle );
metadb_io_v2::get()->update_info_async_simple(
handleList,
pfc::ptr_list_const_array_t<const file_info, const file_info_impl*>( &fileInfo, 1 ),
core_api::get_main_window(),
metadb_io_v2::op_flag_delay_ui,
nullptr );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment