Help - Search - Members - Calendar
Full Version: meta data for file on disk
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Development - (fb2k)
FrozenSpoon
Ran into a problem when trying to do something in the SDK. Say I have some file on disk, not in a playlist, not in the DB. I want to get meta data for the file. I've tried this:
CODE
file_info_i New("C:\\music\\song_wtih_meta.mp3", 0);
New.meta_get_count()


But meta_get_count always returns 0. .get_file_path does return the correct filename.

Any ideas how to do this? I assume I'm just not understanding the way everything fits in the SDK. Thanks.

Edited because not matter how many times I proof read I miss an error.
foosion
file_info is merely an interface for passing information about files around, file_info_i is an implementation of that interface. It does not trigger loading of this information. Use metadb::handle_create() to acquire a metadb_handle of the track you are interested in, and then query the information from that. See masstagger source code for an example of how to use handle_lock(), handle_query_locked(), and handle_unlock() in conjunction.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.