diff --git a/Model/ContentItem.swift b/Model/ContentItem.swift index 2d7fd13e..21f9eaba 100644 --- a/Model/ContentItem.swift +++ b/Model/ContentItem.swift @@ -24,6 +24,8 @@ struct ContentItem: Identifiable { var playlist: ChannelPlaylist! var channel: Channel! + var id: String = UUID().uuidString + static func array(of videos: [Video]) -> [ContentItem] { videos.map { ContentItem(video: $0) } } @@ -32,10 +34,6 @@ struct ContentItem: Identifiable { lhs.contentType < rhs.contentType } - var id: String { - "\(contentType.rawValue)-\(video?.id ?? playlist?.id ?? channel?.id ?? "")" - } - var contentType: ContentType { if !playlist.isNil { return .playlist