Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dangom/apple-music.el
Search through the apple music catalog from within Emacs
https://github.com/dangom/apple-music.el
Last synced: about 1 month ago
JSON representation
Search through the apple music catalog from within Emacs
- Host: GitHub
- URL: https://github.com/dangom/apple-music.el
- Owner: dangom
- Created: 2018-04-04T15:33:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-17T22:29:19.000Z (about 6 years ago)
- Last Synced: 2023-10-05T20:31:16.076Z (about 1 year ago)
- Language: Emacs Lisp
- Size: 6.84 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
#+TITLE: Apple-Music.el
This small library implements apple music search from within Emacs. After searching, it opens the selection in iTunes.
* Installation
Because it relies on Applescript to call up iTunes, I assume this library will only work for MacOS users. This project is not on Melpa yet, so until then, download the file and put it somewhere your Emacs can find it. Then:
#+BEGIN_SRC emacs-lisp
(use-package apple-music
;; Set this to the country of your apple store region. E.g. "us", "de"
:config (setq apple-music-store-region "nl"))
#+END_SRCNote: iTunes has a bug in that searching for a song using the applescript API will highlight that search entry in iTunes but not select it. If it were selected, all we'd have to do is send a button press. Unfortunately, because the content is not selected we have to work around and read the elements of the UI. This requires extra accessibility permissions.
* Usage
Call =apple-music-search=, or assign it to your favorite keybinding to initiate the search. Note that this library relies on the iTunes Search API, so if you perform more than 20 searches per minute your IP will probably be blocked.* TO DOs
- Automatically start playing the selection :: Quite hard actually, as a bug in iTunes means that the selected text is not considered to be selected until manually clicked upon. See [[https://stackoverflow.com/questions/49647648/applescript-play-music-from-itunes-url][this issue over at SO.]]
- Suggest previously played songs :: In the same spirit that Helm-mini offers both a list of buffers and a list of recentf, this library could cache previously chosen songs and offer them again.
- Default to selected region or previous entry :: If a text is selected, use it as the default search term. If not, use a previous entry.
- Add support for searches in own library :: For example implementation in JS see https://github.com/mischah/itunes-remote
- Show current song in modeline :: If a song is playing, show it in the modeline. Plus points if clicking the modeline brings up music metadata.
- Improve UI :: For now completion read gives us "Kind: Title by Artist". Ideally we'd have a clearer interface, similar to what Org-Ref does for bib files.No need to implement next or previous song, nor play/pause as the functionality is already present on any Mac keyboard and most other keyboards as well.