| 326 | | NSDictionary *props = [[NSFileManager defaultManager] fileAttributesAtPath:self.path traverseLink:YES]; |
| | 326 | NSString *path = nil; |
| | 327 | NSFileManager *fm = [NSFileManager defaultManager]; |
| | 328 | if([self fileContainerTypeValue] == FILE_CONTAINER_TYPE_VIDEO_TS) |
| | 329 | { |
| | 330 | NSString *vtsPath = [self.path stringByAppendingPathComponent:@"VIDEO_TS"]; |
| | 331 | NSEnumerator *fileEnum = [[fm directoryContentsAtPath:vtsPath] objectEnumerator]; |
| | 332 | NSString *file; |
| | 333 | while((file = [fileEnum nextObject]) != nil) |
| | 334 | { |
| | 335 | NSString *lowerFile = [file lowercaseString]; |
| | 336 | if([lowerFile hasSuffix:@".ifo"] && ![[lowerFile lastPathComponent] isEqualToString:@"video_ts.ifo"]) |
| | 337 | { |
| | 338 | path = [vtsPath stringByAppendingPathComponent:file]; |
| | 339 | break; |
| | 340 | } |
| | 341 | } |
| | 342 | } |
| | 343 | else |
| | 344 | path = self.path; |
| | 345 | NSDictionary *props = [fm fileAttributesAtPath:path traverseLink:YES]; |
| 513 | | |
| 514 | | [fileMeta setObject:[dvd videoFormatsString ] forKey:META_FILE_VIDEO_DESC_KEY]; |
| 515 | | [fileMeta setObject:[dvd audioFormatsString ] forKey:META_FILE_AUDIO_DESC_KEY]; |
| 516 | | [fileMeta setObject:[dvd subtitlesString ] forKey:META_FILE_SUBTITLES_KEY ]; |
| 517 | | [fileMeta setObject:[dvd mainFeatureDuration] forKey:META_FILE_DURATION_KEY ]; |
| 518 | | [fileMeta setObject:[dvd totalSize ] forKey:META_FILE_SIZE_KEY ]; |
| | 532 | id description = [dvd videoFormatsString]; |
| | 533 | if(description) |
| | 534 | [fileMeta setObject:description forKey:META_FILE_VIDEO_DESC_KEY]; |
| | 535 | description = [dvd audioFormatsString]; |
| | 536 | if(description) |
| | 537 | [fileMeta setObject:description forKey:META_FILE_AUDIO_DESC_KEY]; |
| | 538 | description = [dvd mainFeatureDuration]; |
| | 539 | if(description) |
| | 540 | [fileMeta setObject:description forKey:META_FILE_DURATION_KEY]; |
| | 541 | description = [dvd totalSize]; |
| | 542 | if(description) |
| | 543 | [fileMeta setObject:description forKey:META_FILE_SIZE_KEY]; |
| | 544 | description = [dvd subtitlesString]; |
| | 545 | if(description) |
| | 546 | [fileMeta setObject:description forKey:META_FILE_SUBTITLES_KEY ]; |