Changeset 91
- Timestamp:
- 06/30/07 17:04:56 (2 years ago)
- Files:
-
- trunk/SapphireMetaData.m (modified) (2 diffs)
- trunk/SapphirePopulateDataMenu.h (modified) (1 diff)
- trunk/SapphirePopulateDataMenu.m (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/SapphireMetaData.m
r90 r91 20 20 21 21 //File Specific Keys 22 #define MODIFIED_KEY @"Modified"23 #define WATCHED_KEY @"Watched"24 #define FAVORITE_KEY @"Favorite"25 #define RESUME_KEY @"Resume Time"26 #define SIZE_KEY @"Size"27 #define DURATION_KEY @"Duration"28 #define AUDIO_DESC_KEY @"Audio Description"29 #define SAMPLE_RATE_KEY @"Sample Rate"30 #define VIDEO_DESC_KEY @"Video Description"22 #define MODIFIED_KEY @"Modified" 23 #define WATCHED_KEY @"Watched" 24 #define FAVORITE_KEY @"Favorite" 25 #define RESUME_KEY @"Resume Time" 26 #define SIZE_KEY @"Size" 27 #define DURATION_KEY @"Duration" 28 #define AUDIO_DESC_KEY @"Audio Description" 29 #define SAMPLE_RATE_KEY @"Sample Rate" 30 #define VIDEO_DESC_KEY @"Video Description" 31 31 32 32 //TV Show Specific Keys 33 #define EPISODE_NUMBER_KEY @"Episode Number" 34 #define EPISODE_TITLE_KEY @"Episode Title" 35 #define SEASON_NUMBER_KEY @"Season" 36 #define SHOW_NAME_KEY @"Show Name" 37 #define SHOW_DESCRIPTION_KEY @"Show Description" 38 #define SHOW_AIR_DATE @"Air Date" 33 #define EPISODE_NUMBER_KEY @"Episode Number" 34 #define EPISODE_TITLE_KEY @"Episode Title" 35 #define SEASON_NUMBER_KEY @"Season" 36 #define SHOW_NAME_KEY @"Show Name" 37 #define SHOW_DESCRIPTION_KEY @"Show Description" 38 #define SHOW_AIR_DATE @"Air Date" 39 40 //ATV Extra Info 41 #define SHOW_BROADCASTER_KEY @"Broadcast Company" 42 #define SHOW_PUBLISHED_DATE_KEY @"Published Date" 43 #define SHOW_AQUIRED_DATE @"Date Aquired" 44 #define SHOW_RATING_KEY @"Rating" 45 #define SHOW_FAVORITE_RATING @"User Rating" 46 47 //IMDB Type Info 39 48 40 49 … … 273 282 } 274 283 return NO; 284 } 285 286 - (BOOL)hasXMLMetaData:(NSString *)file 287 { 288 // NSString *extension = [file pathExtension] ; 289 290 return FALSE ; 275 291 } 276 292 trunk/SapphirePopulateDataMenu.h
r81 r91 21 21 BRTextControl *text; 22 22 BRTextControl *fileProgress; 23 BRTextControl *currentFile; 23 24 BRProgressBarWidget *bar; 24 25 trunk/SapphirePopulateDataMenu.m
r84 r91 43 43 text = [[BRTextControl alloc] initWithScene: scene]; 44 44 fileProgress = [[BRTextControl alloc] initWithScene: scene]; 45 currentFile = [[BRTextControl alloc] initWithScene: scene]; 45 46 46 47 bar = [[BRProgressBarWidget alloc] initWithScene: scene]; … … 59 60 [self addControl: text]; 60 61 [self addControl: fileProgress] ; 62 [self addControl: currentFile] ; 61 63 [[self masterLayer] addSublayer:bar]; 62 64 [self addControl: button]; … … 91 93 92 94 NSRect frame; 93 // frame.origin.x = (master.size.width - progressSize.width) * 0.2f; 94 frame.origin.x = (master.size.width) * 0.2f; 95 frame.origin.y = (master.size.height * 0.00f - progressSize.height) + master.size.height * 0.25f/0.8f; 95 frame.origin.x = (master.size.width) * 0.05f; 96 frame.origin.y = (master.size.height * 0.1f - progressSize.height) ; 96 97 frame.size = progressSize; 97 98 [fileProgress setFrame:frame]; 99 } 100 101 - (void)setCurrentFile:(NSString *)theCurrentFile 102 { 103 [currentFile setTextAttributes:[[BRThemeInfo sharedTheme] paragraphTextAttributes]]; 104 [currentFile setText:theCurrentFile]; 105 106 NSRect master = [[self masterLayer] frame]; 107 [currentFile setMaximumSize:NSMakeSize(master.size.width * 9.0f/10.0f, master.size.height * 0.3f)]; 108 NSSize currentFileSize = [currentFile renderedSize]; 109 110 NSRect frame; 111 frame.origin.x = (master.size.width) * 0.05f; 112 frame.origin.y = (master.size.height * 0.07f - currentFileSize.height) ; 113 frame.size = currentFileSize; 114 [currentFile setFrame:frame]; 98 115 } 99 116 … … 119 136 updated = 0 ; 120 137 current = 0; 121 // [self setFileProgress:@"File Progress: <Checking> "];122 // [[self scene] renderScene];123 138 max = [importItems count]; 124 139 importTimer = [NSTimer scheduledTimerWithTimeInterval:0.0f target:self selector:@selector(importNextItem:) userInfo:nil repeats:YES]; … … 128 143 { 129 144 SapphireFileMetaData *fileMeta = [importItems objectAtIndex:0]; 145 NSString * fileName=[[fileMeta path] lastPathComponent] ; 146 current++ ; 147 [self setCurrentFile:[NSString stringWithFormat:@"Current File: %@",fileName]]; 148 [self setFileProgress:[NSString stringWithFormat:@"File Progress: %0.0f / %0.0f", current, max,updated]]; 130 149 if([fileMeta updateMetaData])updated++; 150 131 151 [importItems removeObjectAtIndex:0]; 132 current++ ;133 [self setFileProgress:[NSString stringWithFormat:@"File Progress: %0.0f / %0.0f", current, max,updated]];134 152 [bar setPercentage:current/max * 100.0f]; 135 153 … … 143 161 [title setTitle: @"Import Complete"]; 144 162 [self setFileProgress:[NSString stringWithFormat:@"Updated %0.0f Entries.", updated]]; 163 [self setCurrentFile:@""]; 145 164 [self setText:@"Sapphire will continue to import new files as it encounters them. You may initiate this import again at any time, and any new or changed files will be imported"]; 146 165 [[self scene] renderScene]; … … 161 180 [self setText:@"This will populate Sapphire's Meta data. This proceedure may take a while, but you may cancel at any time"]; 162 181 [self setFileProgress:@" "]; 182 [self setCurrentFile:@" "] ; 163 183 [bar setPercentage:0.0f]; 164 184 [button setTitle: @"Import Meta Data"];
