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: Suppressing information box on load failure (Read 2400 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Suppressing information box on load failure

Is it possible to avoid the popup message that reads:

Quote
Could not load info (Unsupported file format) from:
<filepath>


Also, is it possible to make it so that the list of handles that comes back contains only items that are valid file types, or is there a function to filter the list afterward?

What I am trying to do is process all the items in a directory and create a list of all the valid handles without the popup message occuring... my former method of finding valid handles was this function, but I am thinking there might be a better way:

Code: [Select]
static bool useable_handle(metadb_handle_ptr handle)
{
    if ( handle->get_length() > 0.00 )
 return true;
    if ( strstr(handle->get_path(),"http" ) )
 return true;
    return false;
}


This is how I am calling process_locations:
Code: [Select]
         static_api_ptr_t<playlist_incoming_item_filter> p;
        p->process_locations( file_list, list, true, 0, 0, m_hwnd_tree );
There used to be a link to my website here.

Suppressing information box on load failure

Reply #1
See g_process_path and g_process_path_ex in playlist_loader.

 

Suppressing information box on load failure

Reply #2
EDIT: Nevermind, it looks like I could just procecss only files using g_process_path and recurse into directories myself and avoid redoing g_process_path.

Thanks.

Is it possible to force g_process_path to avoid recursing into subdirectories?

I see that the code for g_process_path and its worker function process_path_internal are both in the SDK, and I could make make a modified function similar to g_process_path that does not recurse, but there might be an easier way.
There used to be a link to my website here.