Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Proper usage of album_art_manager  (Read 1305 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Proper usage of album_art_manager

Hello,

I'm trying to use album_art_manager to fetch album artwork, basically it works but I have some questions regarding its proper usage.
I don't need anything special regarding artwork, just the front cover based on user preferred sources.

Algorithm is the following:
  • Obtain metadb_handle_ptr via playlist_manager
  • Call album_art_manager_v2::open() to get album_art_extractor_instance
  • Call album_art_extractor_instance::query() to get album_art_data

Currently everything is done in the main UI thread, but I think this shouldn't be. Probably steps 2 and 3 could be moved to separate thread or only step 3?

Does album_art_manager_v2::open() always returns something (not NULL)? or should I check for such case as well?

album_art_extractor_instance_v2 also supports query_paths() method, should I try it in addition to query() to reach all possible artwork sources? Or is this done automatically?