Permalink
Browse files

'Download H.264' menu item now respects the HD setting

  • Loading branch information...
1 parent 4eb0347 commit aa0eb2940bd5733d4b85ea54bb33d54365605285 Simone Manganelli committed Jul 4, 2009
Showing with 8 additions and 2 deletions.
  1. +8 −2 Plugin/Plugin.m
View
@@ -1240,8 +1240,14 @@ - (IBAction)downloadH264:(id)sender
NSString* video_id = [self videoId];
NSString* video_hash = [ self _videoHash ];
- NSString* src = [ NSString stringWithFormat: @"http://www.youtube.com/get_video?fmt=18&video_id=%@&t=%@",
- video_id, video_hash ];
+ NSString *src;
+ if ([[CTFUserDefaultsController standardUserDefaults] boolForKey:sUseYouTubeHDH264DefaultsKey]) {
+ src = [ NSString stringWithFormat: @"http://www.youtube.com/get_video?fmt=22&video_id=%@&t=%@",
+ video_id, video_hash ];
+ } else {
+ src = [ NSString stringWithFormat: @"http://www.youtube.com/get_video?fmt=18&video_id=%@&t=%@",
+ video_id, video_hash ];
+ }
[[NSWorkspace sharedWorkspace] openURLs:[NSArray arrayWithObject:[NSURL URLWithString:src]]
withAppBundleIdentifier:[self launchedAppBundleIdentifier]

0 comments on commit aa0eb29

Please sign in to comment.