+ * Deletes current previews associated with titles
+ * @param h Handle to hb_handle_t
+ */
+void hb_remove_previews( hb_handle_t * h )
+{
+ char filename[1024];
+ char dirname[1024];
+ hb_title_t * title;
+ int i, count, len;
+ DIR * dir;
+ struct dirent * entry;
+
+ memset( dirname, 0, 1024 );
+ hb_get_tempory_directory( h, dirname );
+ dir = opendir( dirname );
+ if (dir == NULL) return;
+
+ count = hb_list_count( h->list_title );
+ while( ( entry = readdir( dir ) ) )
+ {
+ if( entry->d_name[0] == '.' )
+ {
+ continue;
+ }
+ for( i = 0; i < count; i++ )
+ {
+ title = hb_list_item( h->list_title, i );
+ len = snprintf( filename, 1024, "%" PRIxPTR, (intptr_t) title );
+ if (strncmp(entry->d_name, filename, len) == 0)
+ {
+ snprintf( filename, 1024, "%s/%s", dirname, entry->d_name );
+ unlink( filename );
+ break;
+ }
+ }
+ }
+ closedir( dir );
+}
+
+/**