We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sorry if this is the wrong place to post this, but is there a way to pull music from the default Music app instead of Spotify?
The text was updated successfully, but these errors were encountered:
Sure! 👍🏼
If you take a look at index.jsx you have the following code:
index.jsx
# === SPOTIFY === # # Uses <JSONQuote> to get around weird quote escape error SPOTIFY=$( osascript -l JavaScript <<EOD | sed -e 's/<JSONQuote>/\"/g' if (Application('Spotify').running()) { var spotify = Application('Spotify') if (spotify.currentTrack() !== null) { var song = spotify.currentTrack().name().replace(/\"/g, "\\\'") var artist = spotify.currentTrack().artist().replace(/\"/g, "\\\'") var artwork = spotify.currentTrack().artworkUrl() var duration = spotify.currentTrack().duration() var position = spotify.playerPosition() var state = spotify.playerState() var shuffle = spotify.shuffling() var repeat = spotify.repeating() "{<JSONQuote>song<JSONQuote>: <JSONQuote>" + song + "<JSONQuote>, <JSONQuote>artist<JSONQuote>: <JSONQuote>" + artist + "<JSONQuote>, <JSONQuote>artwork<JSONQuote>: <JSONQuote>" + artwork + "<JSONQuote>, <JSONQuote>duration<JSONQuote>: <JSONQuote>" + duration + "<JSONQuote>, <JSONQuote>position<JSONQuote>: <JSONQuote>" + position + "<JSONQuote>, <JSONQuote>state<JSONQuote>: <JSONQuote>" + state + "<JSONQuote>, <JSONQuote>repeat<JSONQuote>: <JSONQuote>" + repeat + "<JSONQuote>, <JSONQuote>shuffle<JSONQuote>: <JSONQuote>" + shuffle + "<JSONQuote>}" } else { "{}" } } else { "{}" } EOD )
Here is a link for osascript! Try to find a way to do the same thing but for Music.app. Good luck!
Music.app
Sorry, something went wrong.
No branches or pull requests
Sorry if this is the wrong place to post this, but is there a way to pull music from the default Music app instead of Spotify?
The text was updated successfully, but these errors were encountered: