HydrogenAudio

Hosted Forums => foobar2000 => Development - (fb2k) => Topic started by: baguette on 2012-11-18 18:31:27

Title: album_art_manager bug?
Post by: baguette on 2012-11-18 18:31:27
I'm trying to use album_art_manager, however it only seems to work for embedded art. The documentation states
Quote
//! The main difference between using album_art_manager_instance and calling album_art_extractor methods directly is that
//! album_art_manager_instance will fall back to returning pictures found in the folder containing the specified media file
//! in case requested album art entries can't be extracted from the media file itself.

So I'd expect the query method to return cover art read from a file matching one of the search patterns set on Preferences/Display.
My code basically looks like this:
Code: [Select]
pfc::string8 path;
...
abort_callback_dummy abort;
album_art_manager_instance_ptr aam = static_api_ptr_t<album_art_manager>()->instantiate();
album_art_data_ptr pdata;
aam->open(path.get_ptr(), abort);
try
{
    pdata = aam->query(album_art_ids::cover_front, abort);
}
catch(...)
{
}

The query call only succeeds for embedded cover art, exception_album_art_not_found is thrown otherwise. External cover art is displayed correctly in foobar's album art viewer, though. Moreover, query_stub_image does return the stub image set in the preferences.
Title: album_art_manager bug?
Post by: Peter on 2012-11-19 09:30:07
Please use album_art_manager_v2. Looks like the documentation wasn't properly updated when foobar2000 v1.0 changes were introduced.
Title: album_art_manager bug?
Post by: baguette on 2012-11-19 13:00:26
Ah, this seems to work fine, thanks.