diff --git a/Classes/MetadataImporters/SBChapterDB.m b/Classes/MetadataImporters/SBChapterDB.m index 21606ee..eed4951 100644 --- a/Classes/MetadataImporters/SBChapterDB.m +++ b/Classes/MetadataImporters/SBChapterDB.m @@ -100,8 +100,6 @@ - (SBChapterResult *)parseResult:(NSXMLNode *)child { - NSMutableArray *chapters = [NSMutableArray array]; - NSString *title = [self titleForNode:child]; NSUInteger confirmations = [self confirmationsForNode:child]; NSUInteger duration = [self durationForNode:child]; @@ -111,7 +109,9 @@ MP42Duration currentTime = 0; - if (times && names) { + if (title && times && names) { + + NSMutableArray *chapters = [NSMutableArray array]; for (NSInteger i = 0; i < times.count && i < names.count; i++) { @@ -137,12 +137,14 @@ } } - SBChapterResult *result = [[SBChapterResult alloc] initWithTitle:title - duration:duration - confirmations:confirmations - chapters:chapters]; + if (chapters.count) { + SBChapterResult *result = [[SBChapterResult alloc] initWithTitle:title + duration:duration + confirmations:confirmations + chapters:chapters]; - return [result autorelease]; + return [result autorelease]; + } } return nil; diff --git a/MP42Foundation b/MP42Foundation index 0ef2593..55c0259 160000 --- a/MP42Foundation +++ b/MP42Foundation @@ -1 +1 @@ -Subproject commit 0ef2593efa4a386b50c26fc383848f62870d67d8 +Subproject commit 55c0259a71fc6f42f059374da6f001253b188e3d