YouTube redirects to HTTPS anyway, so my previous attempt to fix 10.4 is bad. I also added a log of the error for loading.

This commit is contained in:
GRMrGecko 2015-06-04 13:03:40 -05:00
parent 2d857bcf70
commit 93869465ef
2 changed files with 7 additions and 5 deletions

View File

@ -463,11 +463,7 @@ NSString * const MGMVT3D = @"3D";
[theAlert runModal];
} else {
NSMutableDictionary *info = [NSMutableDictionary dictionary];
if (![[MGMSystemInfo info] isAfterSnowLeopard]) {
[info setObject:[NSURL URLWithString:[[[video objectForKey:MGMULURL] absoluteString] replace:@"https://" with:@"http://"]] forKey:MGMVLVideoURLKey];
} else {
[info setObject:[video objectForKey:MGMULURL] forKey:MGMVLVideoURLKey];
}
[info setObject:[video objectForKey:MGMULURL] forKey:MGMVLVideoURLKey];
if (![[[videoQualities objectForKey:[video objectForKey:MGMULTag]] objectForKey:MGMVTAudio] boolValue]) {
[info setObject:[audio objectForKey:MGMULURL] forKey:MGMVLAudioURLKey];

View File

@ -614,6 +614,12 @@ NSString * const MGMILPath = @"path";
- (void)updateControls {
if ([[moviePlayer movie] loadState]==-1L) {
NSError *error = [[moviePlayer movie] attributeForKey:@"QTMovieLoadStateErrorAttribute"];
if (error!=nil) {
NSLog(@"%@", error);
} else {
NSLog(@"No error output for this OS.");
}
[moviePlayer setMovie:nil];
if (updateControlsTimer!=nil) {
[updateControlsTimer invalidate];