diff --git a/Limelight/Database/TemporaryApp.h b/Limelight/Database/TemporaryApp.h index 2273072..9305655 100644 --- a/Limelight/Database/TemporaryApp.h +++ b/Limelight/Database/TemporaryApp.h @@ -14,6 +14,7 @@ @property (nullable, nonatomic, retain) NSString *id; @property (nullable, nonatomic, retain) NSData *image; @property (nullable, nonatomic, retain) NSString *name; +@property (nonatomic) BOOL hdrSupported; @property (nullable, nonatomic, retain) TemporaryHost *host; NS_ASSUME_NONNULL_BEGIN diff --git a/Limelight/Database/TemporaryApp.m b/Limelight/Database/TemporaryApp.m index f5f465f..85a4372 100644 --- a/Limelight/Database/TemporaryApp.m +++ b/Limelight/Database/TemporaryApp.m @@ -16,6 +16,7 @@ self.id = app.id; self.image = app.image; self.name = app.name; + self.hdrSupported = app.hdrSupported; self.host = tempHost; return self; @@ -24,6 +25,7 @@ - (void) propagateChangesToParent:(App*)parent withHost:(Host*)host { parent.id = self.id; parent.name = self.name; + parent.hdrSupported = self.hdrSupported; parent.host = host; } diff --git a/Limelight/Limelight.xcdatamodeld/Moonlight v1.1.xcdatamodel/contents b/Limelight/Limelight.xcdatamodeld/Moonlight v1.1.xcdatamodel/contents index 4f16048..be75264 100644 --- a/Limelight/Limelight.xcdatamodeld/Moonlight v1.1.xcdatamodel/contents +++ b/Limelight/Limelight.xcdatamodeld/Moonlight v1.1.xcdatamodel/contents @@ -1,6 +1,7 @@ - + + diff --git a/Limelight/Network/AppListResponse.m b/Limelight/Network/AppListResponse.m index ab6bc22..9c382fd 100644 --- a/Limelight/Network/AppListResponse.m +++ b/Limelight/Network/AppListResponse.m @@ -19,6 +19,7 @@ static const char* TAG_APP = "App"; static const char* TAG_APP_TITLE = "AppTitle"; static const char* TAG_APP_ID = "ID"; +static const char* TAG_HDR_SUPPORTED = "IsHdrSupported"; - (void)populateWithData:(NSData *)xml { self.data = xml; @@ -66,14 +67,13 @@ static const char* TAG_APP_ID = "ID"; xmlNodePtr appInfoNode = node->xmlChildrenNode; NSString* appName = @""; NSString* appId = nil; + NSString* hdrSupported = @"0"; while (appInfoNode != NULL) { if (!xmlStrcmp(appInfoNode->name, (xmlChar*)TAG_APP_TITLE)) { xmlChar* nodeVal = xmlNodeListGetString(docPtr, appInfoNode->xmlChildrenNode, 1); if (nodeVal != NULL) { appName = [[NSString alloc] initWithCString:(const char*)nodeVal encoding:NSUTF8StringEncoding]; xmlFree(nodeVal); - } else { - appName = @""; } } else if (!xmlStrcmp(appInfoNode->name, (xmlChar*)TAG_APP_ID)) { xmlChar* nodeVal = xmlNodeListGetString(docPtr, appInfoNode->xmlChildrenNode, 1); @@ -81,6 +81,12 @@ static const char* TAG_APP_ID = "ID"; appId = [[NSString alloc] initWithCString:(const char*)nodeVal encoding:NSUTF8StringEncoding]; xmlFree(nodeVal); } + } else if (!xmlStrcmp(appInfoNode->name, (xmlChar*)TAG_HDR_SUPPORTED)) { + xmlChar* nodeVal = xmlNodeListGetString(docPtr, appInfoNode->xmlChildrenNode, 1); + if (nodeVal != NULL) { + hdrSupported = [[NSString alloc] initWithCString:(const char*)nodeVal encoding:NSUTF8StringEncoding]; + xmlFree(nodeVal); + } } appInfoNode = appInfoNode->next; } @@ -88,6 +94,7 @@ static const char* TAG_APP_ID = "ID"; TemporaryApp* app = [[TemporaryApp alloc] init]; app.name = appName; app.id = appId; + app.hdrSupported = [hdrSupported intValue] != 0; [_appList addObject:app]; } } diff --git a/Limelight/ViewControllers/MainFrameViewController.m b/Limelight/ViewControllers/MainFrameViewController.m index ad5c641..4874502 100644 --- a/Limelight/ViewControllers/MainFrameViewController.m +++ b/Limelight/ViewControllers/MainFrameViewController.m @@ -176,6 +176,7 @@ static NSMutableSet* hostList; for (TemporaryApp* savedApp in host.appList) { if ([app.id isEqualToString:savedApp.id]) { savedApp.name = app.name; + savedApp.hdrSupported = app.hdrSupported; appAlreadyInList = YES; break; }