Permalink
Browse files

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

Signed-off-by: Jonathan 'Wolf' Rentzsch <jwr.git@redshed.net>
  • Loading branch information...
1 parent 8797bb2 commit 1edb6828de0e6186e7c3d839cc9648773f4f3af5 Simone Manganelli committed with Jul 4, 2009
Showing with 8 additions and 2 deletions.
  1. +8 −2 Plugin/Plugin.m
View
@@ -1224,8 +1224,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 1edb682

Please sign in to comment.