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

Add duration and display albumArt with upnp

Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <>
parent 97a7c334
......@@ -156,9 +156,16 @@
MediaServer1BasicObject *item = _mutableObjectList[indexPath.row];
if (![item isContainer]) {
MediaServer1ItemObject *mediaItem = _mutableObjectList[indexPath.row];
[cell setSubtitle: [NSString stringWithFormat:@"%0.2f MB", (float)([mediaItem.size longLongValue] / 1e6)]];
[cell setSubtitle: [NSString stringWithFormat:@"%0.2f MB (%@)", (float)([mediaItem.size intValue] / 1e6), mediaItem.duration]];
[cell setIsDirectory:NO];
[cell setIcon:[UIImage imageNamed:@"blank"]];
if (![mediaItem.albumArt isEqualToString:NULL]) {
NSData* imageData = [[NSData alloc]initWithContentsOfURL:[NSURL URLWithString:mediaItem.albumArt]];
UIImage* image = [[UIImage alloc] initWithData:imageData];
[cell setIcon:image];
cell.delegate = self;
[cell setIcon:[UIImage imageNamed:@"blank"]];
} else {
[cell setIsDirectory:YES];
[cell setIcon:[UIImage imageNamed:@"folder"]];
......@@ -177,7 +184,6 @@
cell.delegate = self;
return cell;
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