Skip to content

Search current track from Apple Music on discogs.com - AppleScript to use it for Raycast or Shortcuts

Notifications You must be signed in to change notification settings

FL0R1AN84/search-on-discogs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Search on Discogs

Search current track from Apple Music on discogs.com

AppleScript to use it for Raycast or Shortcuts (iCloud Link)

tell application "Music"
 set musicArtist to artist of current track
 set musicName to name of current track
 
-- Remove unwanted characters from the artist name
 set musicArtist to my replace(" & ", " ", musicArtist)
 set musicArtist to my replace(";", "", musicArtist)
 
 tell application "Safari"
  activate
  open location "https://www.discogs.com/search?q=" & musicArtist & "+" & musicName
 end tell
end tell

on replace(oldText, newText, sourceText)
 set {oldTIDs, AppleScript's text item delimiters} to {AppleScript's text item delimiters, oldText}
 set sourceText to text items of sourceText
 set AppleScript's text item delimiters to newText
 set sourceText to sourceText as text
 set AppleScript's text item delimiters to oldTIDs
 return sourceText
end replace

About

Search current track from Apple Music on discogs.com - AppleScript to use it for Raycast or Shortcuts

Topics

Resources

Stars

Watchers

Forks