فهرست منبع

VLCEditController: Fill cell with VLCMLMedia

Soomin Lee 7 سال پیش
والد
کامیت
3f7a8e080c
1فایلهای تغییر یافته به همراه5 افزوده شده و 4 حذف شده
  1. 5 4
      Sources/VLCEditController.swift

+ 5 - 4
Sources/VLCEditController.swift

@@ -63,10 +63,11 @@ extension VLCEditController: UICollectionViewDataSource {
     func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
     func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
         if let cell = collectionView.dequeueReusableCell(withReuseIdentifier: VLCMediaViewEditCell.identifier,
         if let cell = collectionView.dequeueReusableCell(withReuseIdentifier: VLCMediaViewEditCell.identifier,
                                                          for: indexPath) as? VLCMediaViewEditCell {
                                                          for: indexPath) as? VLCMediaViewEditCell {
-            cell.titleLabel.text = "( `ー´)ノ"
-            cell.subInfoLabel.text = "(-ω-、)"
-            cell.sizeLabel.text = "|ω°•)"
-            cell.thumbnailImageView.image = UIImage(named: "vlc-xmas")
+            if let media = category.anyfiles[indexPath.row] as? VLCMLMedia {
+                cell.titleLabel.text = media.title
+                cell.subInfoLabel.text = media.formatDuration(ofMedia: media)
+                cell.sizeLabel.text = media.formatSize(ofMedia: media)
+            }
             return cell
             return cell
         }
         }
         return UICollectionViewCell()
         return UICollectionViewCell()