Commit 661813b7 authored by Felix Paul Kühne's avatar Felix Paul Kühne

UPNP server list: show icon provided by server

parent 92e6ef08
......@@ -20,6 +20,7 @@
@property (nonatomic, readwrite) BOOL isDirectory;
@property (nonatomic, retain) NSString *title;
@property (nonatomic, retain) NSString *subtitle;
@property (nonatomic, retain) UIImage *icon;
+ (VLCLocalNetworkListCell *)cellWithReuseIdentifier:(NSString *)ident;
+ (CGFloat)heightOfCell;
......
......@@ -26,6 +26,7 @@
{
self.titleLabel.text = @"";
self.subtitleLabel.text = @"";
self.thumbnailView.contentMode = UIViewContentModeScaleAspectFit;
}
- (void)setTitle:(NSString *)title
......@@ -45,6 +46,11 @@
self.subtitleLabel.text = subtitle;
}
- (void)setIcon:(UIImage *)icon
{
self.thumbnailView.image = icon;
}
+ (CGFloat)heightOfCell
{
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)
......
......@@ -96,6 +96,9 @@
BasicUPnPDevice *device = _devices[indexPath.row];
[cell setTitle:[device friendlyName]];
UIImage *icon = [device smallIcon];
if (icon)
[cell setIcon:icon];
if ([[device urn] isEqualToString:@"urn:schemas-upnp-org:device:MediaServer:1"])
[cell setIsDirectory:YES];
......
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