ソースを参照

MediaCategoryViewController: Request thumbnail only for video

Soomin Lee 5 年 前
コミット
33c6ec7a5e
1 ファイル変更3 行追加1 行削除
  1. 3 1
      Sources/MediaCategories/MediaCategoryViewController.swift

+ 3 - 1
Sources/MediaCategories/MediaCategoryViewController.swift

@@ -290,7 +290,9 @@ class MediaCategoryViewController: UICollectionViewController, UICollectionViewD
         let mediaObject = isSearching ? searchDataSource.objectAtIndex(index: indexPath.row) : model.anyfiles[indexPath.row]
         if let media = mediaObject as? VLCMLMedia {
             // FIXME: This should be done in the VModel, workaround for the release.
-            services.medialibraryService.requestThumbnail(for: media)
+            if media.type() == .video {
+                services.medialibraryService.requestThumbnail(for: media)
+            }
             assert(media.mainFile() != nil, "The mainfile is nil")
             mediaCell.media = media.mainFile() != nil ? media : nil
         } else {