Rework the preference to avoid stringly typed properties.

This commit is contained in:
Damiano Galassi committed 2020-02-07 15:31:10 +01:00
1 parent 2694bdee45
commit fbc464e643
22 files changed
+321 -228

No files matched your search

+2 -6
View File
@@ -282,12 +282,8 @@ class QueueMetadataAction : NSObject, QueueActionProtocol {
}
}
let defaults = UserDefaults.standard
if let map = metadata.mediaKind == .movie ? defaults.map(forKey: "SBMetadataMovieResultMap2")
: defaults.map(forKey: "SBMetadataTvShowResultMap2") {
return metadata.mappedMetadata(to: map, keepEmptyKeys: false)
}
return nil
let map = metadata.mediaKind == .movie ? MetadataPrefs.movieResultMap : MetadataPrefs.tvShowResultMap
return metadata.mappedMetadata(to: map, keepEmptyKeys: false)
}
func runAction(_ item: QueueItem) -> Bool {