Make scanner stop in middle of scan

This commit is contained in:
Ron Pedde 2006-07-11 05:54:42 +00:00
parent d8bdbe234d
commit e0162752d0
1 changed files with 5 additions and 3 deletions

View File

@ -260,7 +260,7 @@ int scan_init(char **patharray) {
scan_playlistlist.next=NULL; scan_playlistlist.next=NULL;
while(patharray[index] != NULL) { while((patharray[index] != NULL) && (!config.stop)) {
DPRINTF(E_DBG,L_SCAN,"Scanning for MP3s in %s\n",patharray[index]); DPRINTF(E_DBG,L_SCAN,"Scanning for MP3s in %s\n",patharray[index]);
err=scan_path(patharray[index]); err=scan_path(patharray[index]);
index++; index++;
@ -269,8 +269,10 @@ int scan_init(char **patharray) {
if(db_end_song_scan()) if(db_end_song_scan())
return -1; return -1;
if(!config.stop) {
DPRINTF(E_DBG,L_SCAN,"Processing playlists\n"); DPRINTF(E_DBG,L_SCAN,"Processing playlists\n");
scan_process_playlistlist(); scan_process_playlistlist();
}
if(db_end_scan()) if(db_end_scan())
return -1; return -1;