浏览代码

watch playlist: only request the thumbnail size we need

Felix Paul Kühne 10 年之前
父节点
当前提交
cafe040e7f
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      VLC for iOS WatchKit Extension/VLCPlaylistInterfaceController.m

+ 3 - 1
VLC for iOS WatchKit Extension/VLCPlaylistInterfaceController.m

@@ -159,7 +159,9 @@ typedef enum {
 - (void)configureTableRowController:(id)rowController withObject:(id)storageObject {
 
     VLCRowController *row = rowController;
-    UIImage *backgroundImage = [VLCThumbnailsCache thumbnailForManagedObject:storageObject];
+
+    CGRect screenRect = WKInterfaceDevice.currentDevice.screenBounds;
+    UIImage *backgroundImage = [VLCThumbnailsCache thumbnailForManagedObject:storageObject toFitRect: (CGRect){CGPointZero, CGSizeMake(screenRect.size.width * WKInterfaceDevice.currentDevice.screenScale, 120.)} shouldReplaceCache:YES];
 
     float playbackProgress = 0.0;
     if ([storageObject isKindOfClass:[MLShow class]]) {