diff options
author | wr61 <wr61@e10066b5-e1e2-0310-b819-94efdf66514b> | 2005-03-03 13:03:53 +0000 |
---|---|---|
committer | wr61 <wr61@e10066b5-e1e2-0310-b819-94efdf66514b> | 2005-03-03 13:03:53 +0000 |
commit | 9bf477dc24fb18730b3764b18db6ec94e81fd72e (patch) | |
tree | e3ef0e11425bf5a87a235a78793f72ecb44c71d3 /mg_sync.c | |
parent | cb944163a86192c15635df2e6004f090a019cb10 (diff) | |
download | vdr-plugin-muggle-9bf477dc24fb18730b3764b18db6ec94e81fd72e.tar.gz vdr-plugin-muggle-9bf477dc24fb18730b3764b18db6ec94e81fd72e.tar.bz2 |
feedback while importing in plugin
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/branches/0.1.3-wr@532 e10066b5-e1e2-0310-b819-94efdf66514b
Diffstat (limited to 'mg_sync.c')
-rw-r--r-- | mg_sync.c | 20 |
1 files changed, 14 insertions, 6 deletions
@@ -142,6 +142,11 @@ mgSync::mgSync() MYSQL_ROW rx; while ((rx = mysql_fetch_row (m_genre_rows)) != 0) m_Genres[rx[1]]=rx[0]; + // init random number generator + struct timeval tv; + struct timezone tz; + gettimeofday( &tv, &tz ); + srandom( tv.tv_usec ); } mgSync::~mgSync() @@ -293,12 +298,7 @@ mgSync::Sync(char * const * path_argv, bool delete_missing) { mgError("Cannot connect to data base"); } - // init random number generator - struct timeval tv; - struct timezone tz; - gettimeofday( &tv, &tz ); - srandom( tv.tv_usec ); - + unsigned int count=0; m_db.CreateFolderFields(); chdir(the_setup.ToplevelDir); FTS *fts; @@ -316,7 +316,15 @@ mgSync::Sync(char * const * path_argv, bool delete_missing) strcpy(c_extension,extension+1); lower(c_extension); if (!strcmp(c_extension,"flac") || !strcmp(c_extension,"ogg") || !strcmp(c_extension,"mp3")) + { SyncFile(ftsent->fts_path); + count++; + if (count%1000==0) + { + extern void showimportcount(unsigned int); + showimportcount(count); + } + } } fts_close(fts); } |