diff --git a/AirPlay/reverseHTTP.cpp b/AirPlay/reverseHTTP.cpp index 7b067d9..1869c63 100644 --- a/AirPlay/reverseHTTP.cpp +++ b/AirPlay/reverseHTTP.cpp @@ -67,6 +67,7 @@ bool PTTH::conn(const char *address) } printf("[PTTH] %s Connected\n",addr_port); + free(addr_chr); return true; } diff --git a/bilibili/Browser/Browser.mm b/bilibili/Browser/Browser.mm index ae181ae..9ed6f46 100644 --- a/bilibili/Browser/Browser.mm +++ b/bilibili/Browser/Browser.mm @@ -30,8 +30,7 @@ -(CTTabContents*)createTabBasedOn:(CTTabContents*)baseContents withUrl:(NSString } -(CTTabContents*)createTabBasedOn:(CTTabContents*)baseContents withRequest:(NSURLRequest*) req andConfig:(id)cfg{ - NSMutableURLRequest *re = [[NSMutableURLRequest alloc] init]; - re = (NSMutableURLRequest *) req.mutableCopy; + NSMutableURLRequest *re = (NSMutableURLRequest *) req.mutableCopy; NSUserDefaults *settingsController = [NSUserDefaults standardUserDefaults]; NSString *xff = [settingsController objectForKey:@"xff"]; if([xff length] > 4){ diff --git a/bilibili/Browser/TWebView.mm b/bilibili/Browser/TWebView.mm index 7d81db7..58d556a 100644 --- a/bilibili/Browser/TWebView.mm +++ b/bilibili/Browser/TWebView.mm @@ -23,6 +23,8 @@ - (void)dealloc{ } - (TWebView *)initWithRequest:(NSURLRequest *)req andConfig:(id)cfg setDelegate:(id )aDelegate{ + self = [super init]; + if (self.delegate != aDelegate) { self.delegate = aDelegate; settingsController = [NSUserDefaults standardUserDefaults]; @@ -198,8 +200,7 @@ - (NSURLRequest *)webView:(WebView *)sender redirectResponse:(NSURLResponse *)redirectResponse fromDataSource:(WebDataSource *)dataSource{ NSString *URL = [request.URL absoluteString]; - NSMutableURLRequest *re = [[NSMutableURLRequest alloc] init]; - re = (NSMutableURLRequest *) request.mutableCopy; + NSMutableURLRequest *re = (NSMutableURLRequest *) request.mutableCopy; if([URL containsString:@"googlesyndication"] || [URL containsString:@"analytics.js"]){ // Google ad is blocked in some (china) area, maybe take 30 seconds to wait for timeout [re setURL:[NSURL URLWithString:@"http://static.hdslb.com/images/transparent.gif"]]; diff --git a/bilibili/Browser/WebTabView.mm b/bilibili/Browser/WebTabView.mm index 61a1ed4..8ac7e35 100644 --- a/bilibili/Browser/WebTabView.mm +++ b/bilibili/Browser/WebTabView.mm @@ -29,6 +29,7 @@ -(id)initWithBaseTabContents:(CTTabContents*)baseContents { } -(id)initWithRequest:(NSURLRequest *)req andConfig:(id)cfg{ + self = [super init]; webView = [[TWebView alloc] initWithRequest:req andConfig:cfg setDelegate:self]; [self loadStartupScripts]; [self setIsWaitingForResponse:YES]; diff --git a/bilibili/CommentConvert b/bilibili/CommentConvert index 7e0d85b..63b5d7a 160000 --- a/bilibili/CommentConvert +++ b/bilibili/CommentConvert @@ -1 +1 @@ -Subproject commit 7e0d85b2fe9825e80f8a2bd884ef6f80edb543f0 +Subproject commit 63b5d7a32f04d5fd1650969cf5836a11b47de84c diff --git a/bilibili/Info.plist b/bilibili/Info.plist index ca258f9..008f047 100644 --- a/bilibili/Info.plist +++ b/bilibili/Info.plist @@ -233,7 +233,7 @@ CFBundleVersion - 3079 + 3083 Fabric APIKey diff --git a/bilibili/Player/PlayerView.mm b/bilibili/Player/PlayerView.mm index ffa690f..cc27824 100644 --- a/bilibili/Player/PlayerView.mm +++ b/bilibili/Player/PlayerView.mm @@ -372,7 +372,7 @@ - (void) loadMPVSettings{ - (NSDictionary *) getVideoInfo:(NSString *)url{ NSLog(@"[VideoReader] Video Address: %@",url); - BOOL trySimpleParser; + BOOL trySimpleParser = NO; if([url containsString:@".flv"] || [url containsString:@"acgvideo.com"] || [url containsString:@"v.iask.com"] || @@ -396,6 +396,7 @@ - (NSDictionary *) getVideoInfo:(NSString *)url{ @"width": width, @"height": height, }; + delete &MI; return info; } diff --git a/bilibili/Player/PlayerWindow.m b/bilibili/Player/PlayerWindow.m index 98b6358..7d45750 100644 --- a/bilibili/Player/PlayerWindow.m +++ b/bilibili/Player/PlayerWindow.m @@ -80,7 +80,6 @@ - (void)mouseDragged:(NSEvent *)theEvent { CGPoint newOrigin; - currentLocation = [NSEvent mouseLocation]; newOrigin.x = currentLocation.x - initialLocation.x; newOrigin.y = currentLocation.y - initialLocation.y; diff --git a/chromium-tabs b/chromium-tabs index bd66f15..432ed3d 160000 --- a/chromium-tabs +++ b/chromium-tabs @@ -1 +1 @@ -Subproject commit bd66f15222718a9a5cee9694b31ebc8c7f918432 +Subproject commit 432ed3d6b519d742f85d8dfda16f843fb23ca2da