MagnetChoice: Add open in webtor button
WebTor is a website to view magnet links on the web for free. It has an API to include magnets, so why not? Suggested by BlackSwordsman in Discord. Signed-off-by: kingbri <bdashore3@gmail.com>
This commit is contained in:
parent
b88a6cf96f
commit
467eb1eb09
1 changed files with 8 additions and 0 deletions
|
|
@ -74,6 +74,14 @@ struct MagnetChoiceView: View {
|
|||
showActivityView.toggle()
|
||||
}
|
||||
}
|
||||
|
||||
Button("Open in WebTor") {
|
||||
if let result = scrapingModel.selectedSearchResult,
|
||||
let url = URL(string: "https://webtor.io/#/show?magnet=\(result.magnetLink)")
|
||||
{
|
||||
UIApplication.shared.open(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.activitySheet($activityItem)
|
||||
|
|
|
|||
Loading…
Reference in a new issue