| | 310 | - (void)updateDisplay |
|---|
| | 311 | { |
|---|
| | 312 | /*Check for completion*/ |
|---|
| | 313 | if(current == max) |
|---|
| | 314 | { |
|---|
| | 315 | [self setListTitle:BRLocalizedString(@"Import Complete", @"The import is complete")]; |
|---|
| | 316 | [self setFileProgress:[NSString stringWithFormat:BRLocalizedString(@"Updated %0.0f Entries.", @"Import complete format with number updated"), updated]]; |
|---|
| | 317 | [self setCurrentFile:@""]; |
|---|
| | 318 | [self setCompletionText]; |
|---|
| | 319 | [bar setPercentage:100.0f]; |
|---|
| | 320 | [self setButtonTitle:nil]; |
|---|
| | 321 | action = NULL; |
|---|
| | 322 | |
|---|
| | 323 | [SapphireMetaDataSupport save:moc]; |
|---|
| | 324 | |
|---|
| | 325 | NSEnumerator *colEnum = [collectionDirectories objectEnumerator]; |
|---|
| | 326 | SapphireCollectionDirectory *col; |
|---|
| | 327 | while((col = [colEnum nextObject]) != nil) |
|---|
| | 328 | [col.directory refreshAllObjects]; |
|---|
| | 329 | } |
|---|
| | 330 | else |
|---|
| | 331 | { |
|---|
| | 332 | if([importItems count]) |
|---|
| | 333 | { |
|---|
| | 334 | SapphireFileMetaData *fileMeta = [importItems objectAtIndex:0]; |
|---|
| | 335 | NSString * fileName=[[fileMeta path] lastPathComponent] ; |
|---|
| | 336 | [self setCurrentFile:[NSString stringWithFormat:BRLocalizedString(@"Fetching For: %@", "Current TV Show import process format, filename"),fileName]]; |
|---|
| | 337 | } |
|---|
| | 338 | else |
|---|
| | 339 | { |
|---|
| | 340 | [self setCurrentFile:BRLocalizedString(@"Waiting for background import to complete", @"The import is complete, just waiting on background processes")]; |
|---|
| | 341 | } |
|---|
| | 342 | [self setFileProgress:[NSString stringWithFormat:BRLocalizedString(@"Finished Processing: %0.0f / %0.0f", @"Import progress format, current and the max"), current, max,updated]]; |
|---|
| | 343 | [bar setPercentage:current/max * 100.0f]; |
|---|
| | 344 | } |
|---|
| | 345 | [SapphireFrontRowCompat renderScene:[self scene]]; |
|---|
| | 346 | } |
|---|
| | 347 | |
|---|
| 343 | | } |
|---|
| 344 | | else |
|---|
| 345 | | [self setCurrentFile:BRLocalizedString(@"Waiting for background import to complete", @"The import is complete, just waiting on background processes")]; |
|---|
| 346 | | [self setFileProgress:[NSString stringWithFormat:BRLocalizedString(@"Finished Processing: %0.0f / %0.0f", @"Import progress format, current and the max"), current, max,updated]]; |
|---|
| 347 | | [bar setPercentage:current/max * 100.0f]; |
|---|
| 348 | | |
|---|
| 349 | | /*Check for completion*/ |
|---|
| 350 | | if(current == max) |
|---|
| 351 | | { |
|---|
| 352 | | [SapphireMetaDataSupport save:moc]; |
|---|
| 353 | | /*Update display*/ |
|---|
| 354 | | [self setButtonTitle:nil]; |
|---|
| 355 | | action = NULL; |
|---|
| 356 | | [self setListTitle:BRLocalizedString(@"Import Complete", @"The import is complete")]; |
|---|
| 357 | | [self setFileProgress:[NSString stringWithFormat:BRLocalizedString(@"Updated %0.0f Entries.", @"Import complete format with number updated"), updated]]; |
|---|
| 358 | | [self setCurrentFile:@""]; |
|---|
| 359 | | [self setCompletionText]; |
|---|
| 360 | | [SapphireFrontRowCompat renderScene:[self scene]]; |
|---|
| 361 | | |
|---|
| 362 | | NSEnumerator *colEnum = [collectionDirectories objectEnumerator]; |
|---|
| 363 | | SapphireCollectionDirectory *col; |
|---|
| 364 | | while((col = [colEnum nextObject]) != nil) |
|---|
| 365 | | [col.directory refreshAllObjects]; |
|---|
| 366 | | } |
|---|
| 367 | | else |
|---|
| 368 | | { |
|---|