diff --git a/Music/ContentView.swift b/Music/ContentView.swift index 02e6bdc..215fdaa 100644 --- a/Music/ContentView.swift +++ b/Music/ContentView.swift @@ -257,7 +257,18 @@ struct ContentView: View { get: { shazam.matchedTitle != nil }, set: { if !$0 { shazam.clearResult() } } )) { - Button("OK") { shazam.clearResult() } + Button("Search MP3") { + let query = [shazam.matchedTitle, shazam.matchedArtist] + .compactMap { $0 } + .joined(separator: " ") + NSPasteboard.general.clearContents() + NSPasteboard.general.setString(query, forType: .string) + if let url = URL(string: "https://freemp3music.org/") { + NSWorkspace.shared.open(url) + } + shazam.clearResult() + } + Button("Close", role: .cancel) { shazam.clearResult() } } message: { if let title = shazam.matchedTitle { Text("\(title) — \(shazam.matchedArtist ?? "Unknown Artist")")