Commit 9aa83e29 authored by Pierre SAGASPE's avatar Pierre SAGASPE Committed by Felix Paul Kühne
Browse files

plex: fix parser


Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 8e871cbb
...@@ -71,7 +71,8 @@ ...@@ -71,7 +71,8 @@
[_dicoInfo setObject:[attributeDict objectForKey:@"key"] forKey:@"key"]; [_dicoInfo setObject:[attributeDict objectForKey:@"key"] forKey:@"key"];
[_dicoInfo setObject:[attributeDict objectForKey:@"title"] forKey:@"title"]; [_dicoInfo setObject:[attributeDict objectForKey:@"title"] forKey:@"title"];
[_dicoInfo setObject:[attributeDict objectForKey:@"ratingKey"] forKey:@"ratingKey"]; [_dicoInfo setObject:[attributeDict objectForKey:@"ratingKey"] forKey:@"ratingKey"];
[_dicoInfo setObject:[attributeDict objectForKey:@"summary"] forKey:@"summary"]; if ([attributeDict objectForKey:@"summary"])
[_dicoInfo setObject:[attributeDict objectForKey:@"summary"] forKey:@"summary"];
if ([attributeDict objectForKey:@"viewCount"]) if ([attributeDict objectForKey:@"viewCount"])
[_dicoInfo setObject:@"watched" forKey:@"state"]; [_dicoInfo setObject:@"watched" forKey:@"state"];
else else
...@@ -89,7 +90,9 @@ ...@@ -89,7 +90,9 @@
NSString *duration = [[VLCTime timeWithNumber:[attributeDict objectForKey:@"duration"]] stringValue]; NSString *duration = [[VLCTime timeWithNumber:[attributeDict objectForKey:@"duration"]] stringValue];
[_dicoInfo setObject:duration forKey:@"duration"]; [_dicoInfo setObject:duration forKey:@"duration"];
NSString *sizeFile = (NSString *)[attributeDict objectForKey:@"size"]; NSString *sizeFile = (NSString *)[attributeDict objectForKey:@"size"];
[_dicoInfo setObject:sizeFile forKey:@"size"]; if (sizeFile)
[_dicoInfo setObject:sizeFile forKey:@"size"];
} else if ([elementName isEqualToString:@"Stream"]) { } else if ([elementName isEqualToString:@"Stream"]) {
if ([attributeDict objectForKey:@"key"]) if ([attributeDict objectForKey:@"key"])
[_dicoInfo setObject:[NSString stringWithFormat:@"%@%@",_PlexMediaServerUrl, [attributeDict objectForKey:@"key"]] forKey:@"keySubtitle"]; [_dicoInfo setObject:[NSString stringWithFormat:@"%@%@",_PlexMediaServerUrl, [attributeDict objectForKey:@"key"]] forKey:@"keySubtitle"];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment