WIP
This commit is contained in:
@@ -54,6 +54,21 @@ extension ExerciseElement {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func returnOtherVideoURL(currentURL: URL) -> URL? {
|
||||
var urlString: String?
|
||||
if currentURL.absoluteString.lowercased().contains(exercise.nsfwVideoURL.lowercased()) {
|
||||
urlString = exercise.videoURL
|
||||
} else {
|
||||
urlString = exercise.nsfwVideoURL
|
||||
}
|
||||
|
||||
if let urlString = urlString,
|
||||
let url = URL(string: BaseURLs.currentBaseURL + urlString) {
|
||||
return url
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
struct ExerciseExercise: Codable, Hashable, Identifiable {
|
||||
@@ -123,4 +138,19 @@ extension ExerciseExercise {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func returnOtherVideoURL(currentURL: URL) -> URL? {
|
||||
var urlString: String?
|
||||
if currentURL.absoluteString.lowercased().contains(nsfwVideoURL.lowercased()) {
|
||||
urlString = videoURL
|
||||
} else {
|
||||
urlString = nsfwVideoURL
|
||||
}
|
||||
|
||||
if let urlString = urlString,
|
||||
let url = URL(string: BaseURLs.currentBaseURL + urlString) {
|
||||
return url
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user