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

plex: adding codec information on long touch gesture


Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 3ad4ad20
......@@ -480,7 +480,15 @@
NSInteger size = [[[ObjList objectAtIndex:0] objectForKey:@"size"] integerValue];
NSString *mediaSize = [NSByteCountFormatter stringFromByteCount:size countStyle:NSByteCountFormatterCountStyleFile];
NSString *durationInSeconds = [[ObjList objectAtIndex:0] objectForKey:@"duration"];
NSString *message = [NSString stringWithFormat:@"%@ (%@)", mediaSize, durationInSeconds];
NSString *audioCodec = [[ObjList objectAtIndex:0] objectForKey:@"audioCodec"];
if (!audioCodec)
audioCodec = @"no track";
NSString *videoCodec = [[ObjList objectAtIndex:0] objectForKey:@"videoCodec"];
if (!videoCodec)
videoCodec = @"no track";
NSString *message = [NSString stringWithFormat:@"%@ (%@)\naudio(%@) video(%@)", mediaSize, durationInSeconds, audioCodec, videoCodec];
NSString *summary = [NSString stringWithFormat:@"%@", [[ObjList objectAtIndex:0] objectForKey:@"summary"]];
VLCAlertView *alertView = [[VLCAlertView alloc] initWithTitle:title message:message cancelButtonTitle:NSLocalizedString(@"BUTTON_CANCEL", nil) otherButtonTitles:@[NSLocalizedString(@"BUTTON_PLAY", nil), NSLocalizedString(@"BUTTON_DOWNLOAD", nil)]];
......
......@@ -74,6 +74,11 @@
else
[_dicoInfo setObject:@"unwatched" forKey:@"state"];
} else if([elementName isEqualToString:@"Media"]) {
if([attributeDict objectForKey:@"audioCodec"])
[_dicoInfo setObject:[attributeDict objectForKey:@"audioCodec"] forKey:@"audioCodec"];
if([attributeDict objectForKey:@"videoCodec"])
[_dicoInfo setObject:[attributeDict objectForKey:@"videoCodec"] forKey:@"videoCodec"];
} else if([elementName isEqualToString:@"Part"]) {
[_dicoInfo setObject:[NSString stringWithFormat:@"%@%@",_PlexMediaServerUrl, [attributeDict objectForKey:@"key"]] forKey:@"keyMedia"];
if([attributeDict objectForKey:@"file"])
......
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