mirror of
https://github.com/wahyd4/Yep.git
synced 2026-08-09 12:56:15 +10:00
rename AppleiTunesHost
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user