|
@@ -32,6 +32,8 @@ class MediaEditCell: BaseCollectionViewCell {
|
|
|
updateForAlbum(album: album)
|
|
|
} else if let genre = media as? VLCMLGenre {
|
|
|
updateForGenre(genre: genre)
|
|
|
+ } else if let playlist = media as? VLCMLPlaylist {
|
|
|
+ updateForPlaylist(playlist: playlist)
|
|
|
} else {
|
|
|
fatalError("needs to be of a supported Type")
|
|
|
}
|
|
@@ -83,6 +85,15 @@ class MediaEditCell: BaseCollectionViewCell {
|
|
|
//TODO: add thumbnail
|
|
|
}
|
|
|
|
|
|
+ func updateForPlaylist(playlist: VLCMLPlaylist) {
|
|
|
+ thumbnailImageView.layer.cornerRadius = 3
|
|
|
+ AudioAspectRatio.isActive = false
|
|
|
+ VideoAspectRatio.isActive = true
|
|
|
+ titleLabel.text = playlist.name
|
|
|
+ timeLabel.text = playlist.numberOfTracksString()
|
|
|
+ //TODO: add thumbnail
|
|
|
+ }
|
|
|
+
|
|
|
var isChecked: Bool = false {
|
|
|
didSet {
|
|
|
checkboxImageView.image = isChecked ? UIImage(named: "checkboxSelected") : UIImage(named: "checkboxEmpty")
|