X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Flibrary.c;h=c0bcb2425cb265038d864278a2b7618800e9004f;hb=0f2476445358a255955b29c4726bb59b2c002162;hp=db9ff24d8ebc0eebc00b1452fa6d41f100e85de6;hpb=f717f5b0949cf55190ebe9bb41aa07fa7fd545e1;p=omnplay diff --git a/src/library.c b/src/library.c index db9ff24..c0bcb24 100644 --- a/src/library.c +++ b/src/library.c @@ -128,7 +128,7 @@ int omnplay_library_load_file(playlist_item_t* items, int *pcount, char* filenam /* open and process file */ if((f = fopen(filename, "rt"))) { - while( !feof(f) && c < (limit -1)) + while(!feof(f) && c < limit) { char *s, *sp_r, *sp_b; @@ -158,7 +158,9 @@ int omnplay_library_load_file(playlist_item_t* items, int *pcount, char* filenam /* insert item */ items[c++] = item; - }; + } + else + g_warning("omnplay_library_load_file: ignored line [%s]\n", l); } fclose(f); @@ -171,6 +173,8 @@ int omnplay_library_load_file(playlist_item_t* items, int *pcount, char* filenam *pcount = c; + g_warning("omnplay_library_load_file: loaded [%d] items from [%s] file, limit [%d]\n", c, filename, limit); + return r; }; @@ -206,8 +210,8 @@ static void omnplay_library_save_file(playlist_item_t* item, int count, char* fi frames2tc(item[i].in, 25.0, tc_in), frames2tc(item[i].dur, 25.0, tc_dur), item[i].title); - fclose(f); + g_warning("omnplay_library_save_file: written [%d] lines to file [%s]\n", count, filename); }; }; @@ -224,7 +228,9 @@ void omnplay_library_save(omnplay_instance_t* app) static void omnplay_get_content_cb(omnplay_instance_t* app, playlist_item_t* item, void* data) { - omnplay_set_status(app, item->id); + if(!(app->library.id_display_idx % app->library.id_display_rate)) + omnplay_set_status(app, item->id); + app->library.id_display_idx++; }; static void* omnplay_library_refresh_proc(void* data)