From 93869465ef789884f9334bd395aa726c3e2d2ca7 Mon Sep 17 00:00:00 2001 From: GRMrGecko Date: Thu, 4 Jun 2015 13:03:40 -0500 Subject: [PATCH] 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. --- Classes/YouView/MGMVideoFinder.m | 6 +----- Classes/YouView/Player/MGMPlayer.m | 6 ++++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Classes/YouView/MGMVideoFinder.m b/Classes/YouView/MGMVideoFinder.m index a051c16..a160fc0 100644 --- a/Classes/YouView/MGMVideoFinder.m +++ b/Classes/YouView/MGMVideoFinder.m @@ -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]; diff --git a/Classes/YouView/Player/MGMPlayer.m b/Classes/YouView/Player/MGMPlayer.m index 1bc0efe..43dc971 100644 --- a/Classes/YouView/Player/MGMPlayer.m +++ b/Classes/YouView/Player/MGMPlayer.m @@ -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];