Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fl0r1an84/search-on-discogs
Search current track from Apple Music on discogs.com - AppleScript to use it for Raycast or Shortcuts
https://github.com/fl0r1an84/search-on-discogs
applescript discogs music raycast search shortcuts
Last synced: about 1 month ago
JSON representation
Search current track from Apple Music on discogs.com - AppleScript to use it for Raycast or Shortcuts
- Host: GitHub
- URL: https://github.com/fl0r1an84/search-on-discogs
- Owner: FL0R1AN84
- Created: 2023-08-29T20:42:43.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-13T20:12:05.000Z (over 1 year ago)
- Last Synced: 2023-09-14T11:11:39.418Z (over 1 year ago)
- Topics: applescript, discogs, music, raycast, search, shortcuts
- Language: AppleScript
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Search on Discogs
Search current track from Apple Music on discogs.com
AppleScript to use it for Raycast or Shortcuts ([iCloud Link](https://www.icloud.com/shortcuts/318cd6d2c0134c49b5774b1ada4ae0ed "iCloud Link"))
```applescript
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 tellon 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
```