rename AppleiTunesHost

This commit is contained in:
nixzhu
2016-01-15 17:34:58 +08:00
parent 3231b9efa7
commit bdae5848ea
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -97,14 +97,14 @@ extension NSURL {
return nil
}
enum iTunesHost: String {
enum AppleiTunesHost: String {
case Long = "itunes.apple.com"
case Short = "itun.es"
}
var yep_isAppleURL: Bool {
var yep_isAppleiTunesURL: Bool {
guard let host = host, let _ = iTunesHost(rawValue: host) else {
guard let host = host, let _ = AppleiTunesHost(rawValue: host) else {
return false
}
@@ -113,7 +113,7 @@ extension NSURL {
var yep_appleAllianceURL: NSURL {
guard self.yep_isAppleURL else {
guard self.yep_isAppleiTunesURL else {
return self
}
+1 -1
View File
@@ -183,7 +183,7 @@ func openGraphWithURL(URL: NSURL, failureHandler: ((Reason, String?) -> Void)?,
if let URL = response.response?.URL, host = URL.host {
guard let _ = NSURL.iTunesHost(rawValue: host) else {
guard let _ = NSURL.AppleiTunesHost(rawValue: host) else {
completion(openGraph)
return
}