From f9d27a47735c9f68b0f3c0e0aad6b93cdef31a94 Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Mon, 14 Aug 2006 00:00:48 +0000 Subject: [PATCH] Show scan completion in logs --- src/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 3d540389..a9dc352b 100644 --- a/src/main.c +++ b/src/main.c @@ -417,11 +417,16 @@ int main(int argc, char *argv[]) { DPRINTF(E_LOG,L_MAIN|L_SCAN,"Starting mp3 scan\n"); plugin_event_dispatch(PLUGIN_EVENT_FULLSCAN_START,0,NULL,0); + start_time=(int) time(NULL); if(scan_init(mp3_dir_array)) { DPRINTF(E_LOG,L_MAIN|L_SCAN,"Error scanning MP3 files: %s\n",strerror(errno)); } - if(!config.stop) { /* don't send popup when shutting down on scan */ + if(!config.stop) { /* don't send popup when shutting down */ plugin_event_dispatch(PLUGIN_EVENT_FULLSCAN_END,0,NULL,0); + err=db_get_song_count(&perr,&song_count); + end_time=(int) time(NULL); + DPRINTF(E_LOG,L_MAIN|L_SCAN,"Scanned %d songs in %d seconds\n", + song_count,end_time - start_time); } } conf_dispose_array(mp3_dir_array);