-
Notifications
You must be signed in to change notification settings - Fork 2
Usage
James Moy edited this page Jul 31, 2018
·
4 revisions
// Import Headers
#import <DetectStreamKit/DetectStreamKit.h>
// Create an instance of DetectStreamManager
DetectStreamManager *detectstreammgr = [DetectStreamManager new];
// Detect any streams
NSDictionary * d = [_detectstreammgr detectStream];
// Check if we are playing anything
if (d[@"result" == [NSNull null]) {
// Nothing is playing
NSLog(@"Nothing Playing!");
}
else {
// Populate Data
NSString * title = [d objectForKey@"title"];
NSNumber * episode = [d objectForKey@"episode"];
NSNumber * season = [d objectForKey@"season"];
NSString * site = [d objectForKey@"site"];
// Print the stream information
NSLog(@"%@ - %d - %d - %@", title, [episode intValue], [season intValue], site);
}