Fix resource hashes

This commit is contained in:
Ali
2021-04-02 13:05:52 +04:00
parent 2ad13066c5
commit 553d9d793f
2 changed files with 26 additions and 53 deletions

View File

@@ -104,9 +104,10 @@ private struct CachedMediaResourceRepresentationKey: Hashable {
static func ==(lhs: CachedMediaResourceRepresentationKey, rhs: CachedMediaResourceRepresentationKey) -> Bool {
return lhs.resourceId.isEqual(to: rhs.resourceId) && lhs.representation.isEqual(to: rhs.representation)
}
var hashValue: Int {
return self.resourceId.hashValue
func hash(into hasher: inout Hasher) {
hasher.combine(self.resourceId.hashValue)
hasher.combine(self.representation.uniqueId)
}
}