Added 'Save Artwork' toolbar button
This commit is contained in:
committed by
Kim Wittenburg
parent
257a7811d6
commit
3a400037ff
@@ -10,7 +10,7 @@ import Cocoa
|
||||
|
||||
/// Represents an `Album` returned fromm the
|
||||
/// [Search API](https://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html).
|
||||
public class SearchResult: Equatable {
|
||||
public class SearchResult {
|
||||
|
||||
public let id: iTunesId
|
||||
|
||||
@@ -44,6 +44,14 @@ public class SearchResult: Equatable {
|
||||
|
||||
}
|
||||
|
||||
extension SearchResult: Hashable {
|
||||
|
||||
public var hashValue: Int {
|
||||
return Int(id)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension Album {
|
||||
|
||||
public convenience init(searchResult: SearchResult) {
|
||||
@@ -54,12 +62,4 @@ extension Album {
|
||||
|
||||
public func ==(lhs: SearchResult, rhs: SearchResult) -> Bool {
|
||||
return lhs.id == rhs.id
|
||||
}
|
||||
|
||||
public func ==(lhs: SearchResult, rhs: Album) -> Bool {
|
||||
return lhs.id == rhs.id
|
||||
}
|
||||
|
||||
public func ==(lhs: Album, rhs: SearchResult) -> Bool {
|
||||
return lhs.id == rhs.id
|
||||
}
|
||||
Reference in New Issue
Block a user