5 // Created by Pawel Dabrowski on 30/05/2018.
6 // Copyright © 2018 Fundacja Nowoczesna Polska. All rights reserved.
12 class MediaModel: Object, Decodable, NSCopying {
14 @objc dynamic var url: String = ""
15 @objc dynamic var director: String = ""
16 @objc dynamic var type: String = ""
17 @objc dynamic var name: String = ""
18 @objc dynamic var artist: String = ""
20 convenience init(url: String, director: String, type: String, name: String, artist: String) {
24 self.director = director
30 func copy(with zone: NSZone? = nil) -> Any {
31 return MediaModel(url: url, director: director, type: type, name: name, artist: artist)
34 func titleForPlayer() -> String {
35 return "\(artist), \(name)"