Bladeren bron

apple tv : add icons for video and audio media

Pierre SAGASPE 6 jaren geleden
bovenliggende
commit
2433ba38c6

BIN
Apple-TV/Assets.xcassets/NetworkBrowsing/audio.imageset/Audio.png


BIN
Apple-TV/Assets.xcassets/NetworkBrowsing/audio.imageset/Audio@2x.png


+ 18 - 0
Apple-TV/Assets.xcassets/NetworkBrowsing/audio.imageset/Contents.json

@@ -0,0 +1,18 @@
+{
+  "images" : [
+    {
+      "idiom" : "tv",
+      "filename" : "Audio.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "tv",
+      "filename" : "Audio@2x.png",
+      "scale" : "2x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 18 - 0
Apple-TV/Assets.xcassets/NetworkBrowsing/movie.imageset/Contents.json

@@ -0,0 +1,18 @@
+{
+  "images" : [
+    {
+      "idiom" : "tv",
+      "filename" : "Movie.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "tv",
+      "filename" : "Movie@2x.png",
+      "scale" : "2x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
Apple-TV/Assets.xcassets/NetworkBrowsing/movie.imageset/Movie.png


BIN
Apple-TV/Assets.xcassets/NetworkBrowsing/movie.imageset/Movie@2x.png


+ 8 - 1
Apple-TV/VLCRemotePlaybackViewController.m

@@ -17,6 +17,7 @@
 #import "VLCRemoteBrowsingTVCell.h"
 #import "VLCMaskView.h"
 #import "CAAnimation+VLCWiggle.h"
+#import "NSString+SupportedMedia.h"
 
 #define remotePlaybackReuseIdentifer @"remotePlaybackReuseIdentifer"
 
@@ -175,7 +176,13 @@
 
     [cell prepareForReuse];
     [cell setIsDirectory:NO];
-    [cell setThumbnailImage:[UIImage imageNamed:@"blank"]];
+    if (cellTitle.isSupportedMediaFormat) {
+        [cell setThumbnailImage:[UIImage imageNamed:@"movie"]];
+    } else if (cellTitle.isSupportedAudioMediaFormat) {
+        [cell setThumbnailImage:[UIImage imageNamed:@"audio"]];
+    } else {
+        [cell setThumbnailImage:[UIImage imageNamed:@"blank"]];
+    }
     [cell setTitle:cellTitle];
 }