All pastes #333998 Raw Edit

Someone

public c v1 · immutable
#333998 ·published 2007-01-31 08:38 UTC
rendered paste body
                int i = 0,j=1;                gchar *artist = __cover_art_process_string(song->artist);                gchar *album =  __cover_art_process_string(song->album);                do                {                        gchar *url = g_strdup_printf("%s/.covers/%s-%s.albuminfo",                                        g_get_home_dir(),                                        artist,                                        album);                        if(g_file_test(url, G_FILE_TEST_EXISTS))                        {                                *path = url;                                g_free(artist);                                g_free(album);                                return META_DATA_AVAILABLE;                        }                        g_free(url);                        if(j)                        {                                fetch_cover_art(song, NULL);                                /* we are not interested in the cover */                        }                        else                        {                                g_free(artist);                                g_free(album);                                return META_DATA_UNAVAILABLE;                        }                        j--;                }while(1);                /* we shouldn't come here */                g_free(artist);                g_free(album);