Mercurial > audlegacy
diff src/audacious/playlist.c @ 2545:610d85b8a22b trunk
[svn] - on loading a playlist with tuple, invoke the scanner thread only if mtime is -1.
author | yaz |
---|---|
date | Sat, 17 Feb 2007 19:59:01 -0800 |
parents | fcf730269639 |
children | 68d1e9761cc5 |
line wrap: on
line diff
--- a/src/audacious/playlist.c Sat Feb 17 16:59:39 2007 -0800 +++ b/src/audacious/playlist.c Sat Feb 17 19:59:01 2007 -0800 @@ -588,11 +588,11 @@ static void __playlist_ins_with_info(Playlist * playlist, - const gchar * filename, + const gchar * filename, gint pos, const gchar * title, gint len, - InputPlugin * dec) + InputPlugin * dec) { g_return_if_fail(filename != NULL); @@ -639,11 +639,12 @@ } PLAYLIST_UNLOCK(playlist->mutex); - - g_mutex_lock(mutex_scan); - playlist_get_info_scan_active = TRUE; - g_mutex_unlock(mutex_scan); - g_cond_signal(cond_scan); + if(tuple->mtime == -1) { // kick the scanner thread only if mtime = -1 (uninitialized). + g_mutex_lock(mutex_scan); + playlist_get_info_scan_active = TRUE; + g_mutex_unlock(mutex_scan); + g_cond_signal(cond_scan); + } } static void @@ -679,9 +680,9 @@ if (cfg.playlist_detect == TRUE || playlist->loading_playlist == TRUE || (playlist->loading_playlist == FALSE && dec != NULL)) { - __playlist_ins(playlist, filename, pos, dec); - playlist_generate_shuffle_list(playlist); - playlistwin_update_list(playlist); + __playlist_ins(playlist, filename, pos, dec); + playlist_generate_shuffle_list(playlist); + playlistwin_update_list(playlist); return TRUE; } @@ -2468,7 +2469,7 @@ update_playlistwin = TRUE; if (entry == playlist->position) update_mainwin = TRUE; - // no need for break here since this iteration is very short. + // no need for break here since this iteration is very short. } } PLAYLIST_UNLOCK(playlist->mutex);