From 0e23908b78b05fe471409909ad3283e6539cefac Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 27 May 2015 07:23:09 +0200 Subject: [PATCH] (Task database) Should fix ZIP playlist scanning --- tasks/task_database.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/tasks/task_database.c b/tasks/task_database.c index c616862eb3..d8255a135b 100644 --- a/tasks/task_database.c +++ b/tasks/task_database.c @@ -162,15 +162,6 @@ static int database_info_list_iterate_found_match( playlist = content_playlist_init(db_playlist_path, 1000); -#if 0 - RARCH_LOG("Found match in database !\n"); - - RARCH_LOG("Path: %s\n", db_path); - RARCH_LOG("Playlist Path: %s\n", db_playlist_path); - RARCH_LOG("Entry Path: %s\n", entry_path); - RARCH_LOG("Playlist not NULL: %d\n", playlist != NULL); - RARCH_LOG("ZIP entry: %s\n", zip_name); -#endif snprintf(db_crc, sizeof(db_crc), "%s|crc", db_info_entry->crc32); @@ -181,6 +172,18 @@ static int database_info_list_iterate_found_match( strlcat(entry_path_str, zip_name, sizeof(entry_path_str)); } +#if 0 + RARCH_LOG("Found match in database !\n"); + + RARCH_LOG("Path: %s\n", db_path); + RARCH_LOG("CRC : %s\n", db_crc); + RARCH_LOG("Playlist Path: %s\n", db_playlist_path); + RARCH_LOG("Entry Path: %s\n", entry_path); + RARCH_LOG("Playlist not NULL: %d\n", playlist != NULL); + RARCH_LOG("ZIP entry: %s\n", zip_name); + RARCH_LOG("entry path str: %s\n", entry_path_str); +#endif + content_playlist_push(playlist, entry_path_str, db_info_entry->name, "DETECT", "DETECT", db_crc); content_playlist_write_file(playlist); @@ -229,7 +232,7 @@ static int database_info_iterate_crc_lookup( #endif if (rarch_strcasestr(entry_state_crc, db_info_entry->crc32)) - return database_info_list_iterate_found_match(db_state, db, zip_entry); + database_info_list_iterate_found_match(db_state, db, zip_entry); } }