diff --git a/XCDYouTubeKit.xcodeproj/project.pbxproj b/XCDYouTubeKit.xcodeproj/project.pbxproj index 5f4f153d..e11bcd20 100644 --- a/XCDYouTubeKit.xcodeproj/project.pbxproj +++ b/XCDYouTubeKit.xcodeproj/project.pbxproj @@ -7,16 +7,16 @@ objects = { /* Begin PBXBuildFile section */ - 017234C223FC223D00196707 /* XCDURLGetOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 017234C023FC223D00196707 /* XCDURLGetOperation.h */; }; - 017234C323FC223D00196707 /* XCDURLGetOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 017234C123FC223D00196707 /* XCDURLGetOperation.m */; }; - 017234C423FC223D00196707 /* XCDURLGetOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 017234C123FC223D00196707 /* XCDURLGetOperation.m */; }; + 017234C223FC223D00196707 /* XCDURLGETOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 017234C023FC223D00196707 /* XCDURLGETOperation.h */; }; + 017234C323FC223D00196707 /* XCDURLGETOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 017234C123FC223D00196707 /* XCDURLGETOperation.m */; }; + 017234C423FC223D00196707 /* XCDURLGETOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 017234C123FC223D00196707 /* XCDURLGETOperation.m */; }; 0178E76D23F49BBC001C382E /* XCDYouTubeVideoQueryOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0178E76C23F49BBC001C382E /* XCDYouTubeVideoQueryOperation.m */; }; 0178E76E23F4A023001C382E /* XCDYouTubeVideoQueryOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 0178E76B23F49BBC001C382E /* XCDYouTubeVideoQueryOperation.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0178E76F23F4A02A001C382E /* XCDYouTubeVideoQueryOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0178E76C23F49BBC001C382E /* XCDYouTubeVideoQueryOperation.m */; }; 0178E77023F4A049001C382E /* XCDYouTubeVideoQueryOperation.h in Copy Files */ = {isa = PBXBuildFile; fileRef = 0178E76B23F49BBC001C382E /* XCDYouTubeVideoQueryOperation.h */; }; - 0178E77323F4A0D8001C382E /* XCDURLHeadOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 0178E77123F4A0D8001C382E /* XCDURLHeadOperation.h */; }; - 0178E77423F4A0D8001C382E /* XCDURLHeadOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0178E77223F4A0D8001C382E /* XCDURLHeadOperation.m */; }; - 0178E77523F4A0D8001C382E /* XCDURLHeadOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0178E77223F4A0D8001C382E /* XCDURLHeadOperation.m */; }; + 0178E77323F4A0D8001C382E /* XCDURLHEADOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 0178E77123F4A0D8001C382E /* XCDURLHEADOperation.h */; }; + 0178E77423F4A0D8001C382E /* XCDURLHEADOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0178E77223F4A0D8001C382E /* XCDURLHEADOperation.m */; }; + 0178E77523F4A0D8001C382E /* XCDURLHEADOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0178E77223F4A0D8001C382E /* XCDURLHEADOperation.m */; }; 01D2370A1FA03AC100A13E5F /* XCDYouTubeDashManifestXML.m in Sources */ = {isa = PBXBuildFile; fileRef = 01D237091FA03AC100A13E5F /* XCDYouTubeDashManifestXML.m */; }; 01D2370B1FA03ADE00A13E5F /* XCDYouTubeDashManifestXML.h in Headers */ = {isa = PBXBuildFile; fileRef = 01D237081FA03AC100A13E5F /* XCDYouTubeDashManifestXML.h */; }; 01D2370C1FA03AF100A13E5F /* XCDYouTubeDashManifestXML.m in Sources */ = {isa = PBXBuildFile; fileRef = 01D237091FA03AC100A13E5F /* XCDYouTubeDashManifestXML.m */; }; @@ -110,12 +110,12 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 017234C023FC223D00196707 /* XCDURLGetOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XCDURLGetOperation.h; sourceTree = ""; }; - 017234C123FC223D00196707 /* XCDURLGetOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XCDURLGetOperation.m; sourceTree = ""; }; + 017234C023FC223D00196707 /* XCDURLGETOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XCDURLGETOperation.h; sourceTree = ""; }; + 017234C123FC223D00196707 /* XCDURLGETOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XCDURLGETOperation.m; sourceTree = ""; }; 0178E76B23F49BBC001C382E /* XCDYouTubeVideoQueryOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XCDYouTubeVideoQueryOperation.h; sourceTree = ""; }; 0178E76C23F49BBC001C382E /* XCDYouTubeVideoQueryOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XCDYouTubeVideoQueryOperation.m; sourceTree = ""; }; - 0178E77123F4A0D8001C382E /* XCDURLHeadOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XCDURLHeadOperation.h; sourceTree = ""; }; - 0178E77223F4A0D8001C382E /* XCDURLHeadOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XCDURLHeadOperation.m; sourceTree = ""; }; + 0178E77123F4A0D8001C382E /* XCDURLHEADOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XCDURLHEADOperation.h; sourceTree = ""; }; + 0178E77223F4A0D8001C382E /* XCDURLHEADOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XCDURLHEADOperation.m; sourceTree = ""; }; 01D237081FA03AC100A13E5F /* XCDYouTubeDashManifestXML.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XCDYouTubeDashManifestXML.h; sourceTree = ""; }; 01D237091FA03AC100A13E5F /* XCDYouTubeDashManifestXML.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XCDYouTubeDashManifestXML.m; sourceTree = ""; }; 01EAD0DE23FACB0800F1E936 /* XCDYouTubeVideoQueryOperationTestCase.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XCDYouTubeVideoQueryOperationTestCase.m; sourceTree = ""; }; @@ -249,10 +249,10 @@ C24C162D18E9A139005E92E9 /* XCDYouTubeVideoOperation.m */, 0178E76B23F49BBC001C382E /* XCDYouTubeVideoQueryOperation.h */, 0178E76C23F49BBC001C382E /* XCDYouTubeVideoQueryOperation.m */, - 0178E77123F4A0D8001C382E /* XCDURLHeadOperation.h */, - 0178E77223F4A0D8001C382E /* XCDURLHeadOperation.m */, - 017234C023FC223D00196707 /* XCDURLGetOperation.h */, - 017234C123FC223D00196707 /* XCDURLGetOperation.m */, + 0178E77123F4A0D8001C382E /* XCDURLHEADOperation.h */, + 0178E77223F4A0D8001C382E /* XCDURLHEADOperation.m */, + 017234C023FC223D00196707 /* XCDURLGETOperation.h */, + 017234C123FC223D00196707 /* XCDURLGETOperation.m */, C2A3F2D517F4827800AC1C3B /* XCDYouTubeVideoPlayerViewController.h */, C2A3F2D717F4827800AC1C3B /* XCDYouTubeVideoPlayerViewController.m */, C2386B1C1974036300646123 /* XCDYouTubeVideoWebpage.h */, @@ -307,12 +307,12 @@ C257F7941C206D26006146D3 /* XCDYouTubeLogger.h in Headers */, C257F7911C206B8F006146D3 /* XCDYouTubeLogger+Private.h in Headers */, C2F0E5901944F83E00D8EBA8 /* XCDYouTubeOperation.h in Headers */, - 0178E77323F4A0D8001C382E /* XCDURLHeadOperation.h in Headers */, + 0178E77323F4A0D8001C382E /* XCDURLHEADOperation.h in Headers */, C2F0E5931944F84700D8EBA8 /* XCDYouTubeVideo.h in Headers */, C2F0E5941944F84A00D8EBA8 /* XCDYouTubeVideoOperation.h in Headers */, C215BEB91BE2E5B500F9783B /* XCDYouTubeVideoWebpage.h in Headers */, C2F0E5951944F85500D8EBA8 /* XCDYouTubeVideoPlayerViewController.h in Headers */, - 017234C223FC223D00196707 /* XCDURLGetOperation.h in Headers */, + 017234C223FC223D00196707 /* XCDURLGETOperation.h in Headers */, C2F0E5921944F84400D8EBA8 /* XCDYouTubeVideo+Private.h in Headers */, C2F0E5911944F84200D8EBA8 /* XCDYouTubePlayerScript.h in Headers */, ); @@ -525,8 +525,8 @@ C25308C518D7392500132734 /* XCDYouTubeClient.m in Sources */, 0178E76D23F49BBC001C382E /* XCDYouTubeVideoQueryOperation.m in Sources */, C24C162E18E9A139005E92E9 /* XCDYouTubeVideoOperation.m in Sources */, - 017234C323FC223D00196707 /* XCDURLGetOperation.m in Sources */, - 0178E77423F4A0D8001C382E /* XCDURLHeadOperation.m in Sources */, + 017234C323FC223D00196707 /* XCDURLGETOperation.m in Sources */, + 0178E77423F4A0D8001C382E /* XCDURLHEADOperation.m in Sources */, 01D2370A1FA03AC100A13E5F /* XCDYouTubeDashManifestXML.m in Sources */, C25308C818D739EB00132734 /* XCDYouTubeVideo.m in Sources */, C2597EA61B0CE6D80030E9F2 /* XCDYouTubeLogger.m in Sources */, @@ -543,8 +543,8 @@ C2F0E59C1944F8CF00D8EBA8 /* XCDYouTubeVideoOperation.m in Sources */, 0178E76F23F4A02A001C382E /* XCDYouTubeVideoQueryOperation.m in Sources */, C2F0E5991944F8C200D8EBA8 /* XCDYouTubeClient.m in Sources */, - 017234C423FC223D00196707 /* XCDURLGetOperation.m in Sources */, - 0178E77523F4A0D8001C382E /* XCDURLHeadOperation.m in Sources */, + 017234C423FC223D00196707 /* XCDURLGETOperation.m in Sources */, + 0178E77523F4A0D8001C382E /* XCDURLHEADOperation.m in Sources */, 01D2370C1FA03AF100A13E5F /* XCDYouTubeDashManifestXML.m in Sources */, C2F0E59A1944F8C700D8EBA8 /* XCDYouTubePlayerScript.m in Sources */, C2597EA71B0CE6D80030E9F2 /* XCDYouTubeLogger.m in Sources */, diff --git a/XCDYouTubeKit/XCDURLGetOperation.h b/XCDYouTubeKit/XCDURLGETOperation.h similarity index 94% rename from XCDYouTubeKit/XCDURLGetOperation.h rename to XCDYouTubeKit/XCDURLGETOperation.h index 39984c13..6c785579 100644 --- a/XCDYouTubeKit/XCDURLGetOperation.h +++ b/XCDYouTubeKit/XCDURLGETOperation.h @@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((visibility("hidden"))) -@interface XCDURLGetOperation : NSOperation +@interface XCDURLGETOperation : NSOperation - (instancetype) initWithURL:(NSURL *)url info:(nullable NSDictionary *)info cookes:(nullable NSArray *)cookies; diff --git a/XCDYouTubeKit/XCDURLGetOperation.m b/XCDYouTubeKit/XCDURLGETOperation.m similarity index 97% rename from XCDYouTubeKit/XCDURLGetOperation.m rename to XCDYouTubeKit/XCDURLGETOperation.m index a6aca383..93d05888 100644 --- a/XCDYouTubeKit/XCDURLGetOperation.m +++ b/XCDYouTubeKit/XCDURLGETOperation.m @@ -6,10 +6,10 @@ // Copyright © 2020 Cédric Luthi. All rights reserved. // -#import "XCDURLGetOperation.h" +#import "XCDURLGETOperation.h" #import "XCDYouTubeLogger+Private.h" -@interface XCDURLGetOperation() +@interface XCDURLGETOperation() @property (atomic, assign) BOOL isExecuting; @property (atomic, assign) BOOL isFinished; @@ -23,7 +23,7 @@ @interface XCDURLGetOperation() *)cookies { diff --git a/XCDYouTubeKit/XCDURLHeadOperation.h b/XCDYouTubeKit/XCDURLHEADOperation.h similarity index 94% rename from XCDYouTubeKit/XCDURLHeadOperation.h rename to XCDYouTubeKit/XCDURLHEADOperation.h index a997a25f..bbaa8b03 100644 --- a/XCDYouTubeKit/XCDURLHeadOperation.h +++ b/XCDYouTubeKit/XCDURLHEADOperation.h @@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((visibility("hidden"))) -@interface XCDURLHeadOperation : NSOperation +@interface XCDURLHEADOperation : NSOperation - (instancetype)initWithURL:(NSURL *)url info:(nullable NSDictionary *)info cookes:(nullable NSArray *)cookies; diff --git a/XCDYouTubeKit/XCDURLHeadOperation.m b/XCDYouTubeKit/XCDURLHEADOperation.m similarity index 96% rename from XCDYouTubeKit/XCDURLHeadOperation.m rename to XCDYouTubeKit/XCDURLHEADOperation.m index b16ecc93..7c1593b9 100644 --- a/XCDYouTubeKit/XCDURLHeadOperation.m +++ b/XCDYouTubeKit/XCDURLHEADOperation.m @@ -6,10 +6,10 @@ // Copyright © 2020 Cédric Luthi. All rights reserved. // -#import "XCDURLHeadOperation.h" +#import "XCDURLHEADOperation.h" #import "XCDYouTubeLogger+Private.h" -@interface XCDURLHeadOperation () +@interface XCDURLHEADOperation () @property (atomic, assign) BOOL isExecuting; @property (atomic, assign) BOOL isFinished; @@ -24,7 +24,7 @@ @interface XCDURLHeadOperation () @end -@implementation XCDURLHeadOperation +@implementation XCDURLHEADOperation - (instancetype) initWithURL:(NSURL *)url info:(NSDictionary *)info cookes:(NSArray *)cookies { diff --git a/XCDYouTubeKit/XCDYouTubeVideoQueryOperation.m b/XCDYouTubeKit/XCDYouTubeVideoQueryOperation.m index e1648ce3..1cf5bffd 100644 --- a/XCDYouTubeKit/XCDYouTubeVideoQueryOperation.m +++ b/XCDYouTubeKit/XCDYouTubeVideoQueryOperation.m @@ -7,9 +7,9 @@ // #import "XCDYouTubeVideoQueryOperation.h" -#import "XCDURLHeadOperation.h" +#import "XCDURLHEADOperation.h" #import "XCDYouTubeError.h" -#import "XCDURLGetOperation.h" +#import "XCDURLGETOperation.h" #import "XCDYouTubeLogger+Private.h" @interface XCDYouTubeVideoQueryOperation () @@ -103,13 +103,13 @@ - (void) startQuery { XCDYouTubeLogDebug(@"Starting query request for video: %@", self.video); - NSMutableArray *HEADOperations = [NSMutableArray new]; + NSMutableArray *HEADOperations = [NSMutableArray new]; BOOL isHTTPLiveStream = self.video.streamURLs[XCDYouTubeVideoQualityHTTPLiveStreaming] != nil; [self.video.streamURLs enumerateKeysAndObjectsUsingBlock:^(id _Nonnull key, NSURL * _Nonnull obj, BOOL * _Nonnull stop) { - XCDURLHeadOperation *operation = [[XCDURLHeadOperation alloc]initWithURL:obj info:@{key : obj} cookes:self.cookies]; + XCDURLHEADOperation *operation = [[XCDURLHEADOperation alloc]initWithURL:obj info:@{key : obj} cookes:self.cookies]; [HEADOperations addObject:operation]; }]; @@ -119,11 +119,11 @@ - (void) startQuery if (self.isCancelled) return; - NSMutableArray *GETOperations = [NSMutableArray new]; + NSMutableArray *GETOperations = [NSMutableArray new]; NSMutableDictionary *streamErrors = [NSMutableDictionary new]; NSMutableDictionary *streamURLs = [NSMutableDictionary new]; - for (XCDURLHeadOperation *HEADOperation in HEADOperations) + for (XCDURLHEADOperation *HEADOperation in HEADOperations) { if (HEADOperation.error != nil) @@ -141,7 +141,7 @@ - (void) startQuery } else { - [GETOperations addObject:[[XCDURLGetOperation alloc]initWithURL:HEADOperation.url info:HEADOperation.info cookes:HEADOperation.cookies]]; + [GETOperations addObject:[[XCDURLGETOperation alloc]initWithURL:HEADOperation.url info:HEADOperation.info cookes:HEADOperation.cookies]]; } } } @@ -159,13 +159,13 @@ - (void) startQuery [self startGETOperations:GETOperations streamErrors:streamErrors]; } -- (void) startGETOperations:(NSArray *)GETOperations streamErrors:(NSMutableDictionary *)streamErrors +- (void) startGETOperations:(NSArray *)GETOperations streamErrors:(NSMutableDictionary *)streamErrors { [self.queryQueue addOperations:GETOperations waitUntilFinished:YES]; NSMutableDictionary *streamURLs = [NSMutableDictionary new]; - for (XCDURLGetOperation *GETOperation in GETOperations) + for (XCDURLGETOperation *GETOperation in GETOperations) { if (GETOperation.error != nil)