Przeglądaj źródła

watch playlist: only request the thumbnail size we need

Felix Paul Kühne 10 lat temu
rodzic
commit
cafe040e7f

+ 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]]) {