Changeset 535
- Timestamp:
- 05/15/08 15:19:36 (8 months ago)
- Files:
-
- trunk/SapphireFrappliance/SapphireMetaData.m (modified) (1 diff)
- trunk/SapphireFrappliance/SapphireVideoTSParser.h (modified) (2 diffs)
- trunk/SapphireFrappliance/SapphireVideoTSParser.m (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/SapphireFrappliance/SapphireMetaData.m
r529 r535 1713 1713 [fileMeta setObject:[dvd subtitlesString ] forKey:SUBTITLES_KEY ]; 1714 1714 [fileMeta setObject:[dvd mainFeatureDuration] forKey:DURATION_KEY ]; 1715 [fileMeta setObject:[dvd totalSize ] forKey:SIZE_KEY ]; 1715 1716 1716 1717 [dvd release]; trunk/SapphireFrappliance/SapphireVideoTSParser.h
r529 r535 26 26 const NSString *subtitles; 27 27 long long duration; 28 const NSNumber *size; 28 29 } 29 30 … … 81 82 */ 82 83 - (const NSNumber * const) mainFeatureDuration; 84 85 /*! 86 * @brief Return the size of a ripped DVD 87 * 88 * @return Calculated DVD size 89 */ 90 - (const NSNumber * const) totalSize; 91 83 92 @end trunk/SapphireFrappliance/SapphireVideoTSParser.m
r529 r535 183 183 184 184 unsigned long long ifoSz = 0; 185 unsigned long long total = 0; 185 186 186 187 // The largest IFO file (not including VIDEO_TS.IFO) corresponds to the main feature 187 188 while( filePath = [enumerator nextObject] ) 188 189 { 190 unsigned long long sz = [[[fm fileAttributesAtPath:[videotsPath stringByAppendingPathComponent:filePath] traverseLink:YES] valueForKey:NSFileSize] unsignedLongLongValue]; 191 total += sz; 192 189 193 if( [[filePath lowercaseString] hasSuffix:@".ifo"] && [[filePath lastPathComponent] caseInsensitiveCompare:@"video_ts.ifo"] != NSOrderedSame ) 190 194 { 191 unsigned long long sz = [[[fm fileAttributesAtPath:[videotsPath stringByAppendingPathComponent:filePath] traverseLink:YES] valueForKey:NSFileSize] unsignedLongLongValue];192 193 195 if ( sz > ifoSz ) 194 196 { … … 198 200 } 199 201 } 202 203 size = [NSNumber numberWithLongLong:total]; 200 204 201 205 if( ifoPath != nil ) … … 404 408 } 405 409 410 - (const NSNumber * const) totalSize 411 { 412 return size; 413 } 414 406 415 @end
