From 4bff40cd0865f37bbc8680883e1db0e22d9247c7 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Wed, 25 Nov 2009 21:54:06 +0000 Subject: fix title index issue in batch scanning title index was assigned as the nth file in the directory, but files that are not video would cause title indexes to be skipped in job.list_title this would mess up the progress bar. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2982 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/scan.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libhb/scan.c') diff --git a/libhb/scan.c b/libhb/scan.c index ea15fc512..66afb2a21 100644 --- a/libhb/scan.c +++ b/libhb/scan.c @@ -97,14 +97,17 @@ static void ScanFunc( void * _data ) } else if ( ( data->batch = hb_batch_init( data->path ) ) ) { + int j = 1; + /* Scan all titles */ for( i = 0; i < hb_batch_title_count( data->batch ); i++ ) { hb_title_t * title; - title = hb_batch_title_scan( data->batch, i + 1 ); + title = hb_batch_title_scan( data->batch, i ); if ( title != NULL ) { + title->index = j++; hb_list_add( data->list_title, title ); } } -- cgit v1.2.3