A Jellyfin music player for Emacs using mpv.
Work-in-progress! Many features are still missing/half-baked.
This package is not yet in any repositories. Install it with your favorite from-Git method!
Clone this repository and add it to your load-path:
(add-to-list 'load-path "/path/to/elfin") (require 'elfin)Authenticate with your Jellyfin server using one of the following methods:
M-x elfin-quick-connect- Authenticate by providing a server URL, and then using Quick Connect (preferred).
M-x elfin-authenticate- Authenticate using the standard server URL, username, password flow.
Sessions are stored in memory by default. To persist sessions across Emacs restarts, set elfin-session-file before authenticating:
(setopt elfin-session-file (expand-file-name "elfin-sessions" user-emacs-directory))Use M-x elfin-restore-sessions to reload saved sessions.
To manage sessions:
M-x elfin-delete-session- Delete a specific session.
M-x elfin-delete-all-sessions- Delete all sessions.
Browse your Jellyfin library with the following entry points:
| Command | Binding (in view) | Description |
|---|---|---|
elfin-albums | 1 | List all albums |
elfin-artists | 2 | List all artists |
elfin-tracks | 3 | List all tracks |
elfin-playlists | 4 | List all playlists |
Items are displayed in a tabulated list with thumbnails. Within a view buffer:
| Key | Command | Description |
|---|---|---|
RET | elfin-items-open | Open item (open album/artist, or play track) |
a | elfin-items-queue | Add item to playback queue |
C-<return> | elfin-items-play | Play item, replacing current queue |
s | elfin-items-search | Search within current view |
S | elfin-items-clear-search | Clear search filter |
N | elfin-items-next-page | Next page of results |
P | elfin-items-prev-page | Previous page of results |
Playback is handled via mpv, which is started automatically when needed.
| Command | Description |
|---|---|
elfin-pause | Toggle pause |
elfin-stop | Stop playback and clear queue |
elfin-volume-up | Increase volume |
elfin-volume-down | Decrease volume |
elfin-volume-set | Set volume to a specific value |
elfin-loop-track | Toggle track looping |
elfin-loop-playlist | Toggle playlist looping |
elfin-clear-queue | Clear the playback queue |
elfin-kill | Kill the mpv process |
| Variable | Default | Description |
|---|---|---|
elfin-session-file | nil | File to persist sessions across restarts |
elfin-default-volume | 100 | Default mpv volume (0–100) |
elfin-volume-step | 5 | Step size for volume up/down |
elfin-replaygain | nil | ReplayGain mode (nil, track, or album) |
elfin-mpv-extra-options | nil | Extra command-line options for mpv |
Elfin provides hooks for integrating with other packages:
elfin-file-start-hook- Run when a new file starts playing (receives track ID).
elfin-file-end-hook- Run when a file finishes (receives track ID and reason).
elfin-pause-hook- Run when pause state changes (receives non-nil if paused).
elfin-idle-hook- Run when mpv enters idle state.
(require 'elfin) (setopt elfin-session-file (expand-file-name "elfin-sessions" user-emacs-directory) elfin-default-volume 80 elfin-volume-step 5 elfin-replaygain 'album) (elfin-restore-sessions) ;; Optional: ListenBrainz scrobbling (require 'elfin-listenbrainz) (setopt elfin-listenbrainz-token "your-token-here") (elfin-listenbrainz-mode 1)The extras/ directory includes optional, self-contained extensions that extend Elfin in various ways.
A global minor mode for scrobbling tracks to ListenBrainz (or any compatible API).
(setopt elfin-listenbrainz-token "your-token-here") (elfin-listenbrainz-mode 1)- [ ] Rework keymaps
- [ ] Shuffle
- [ ] Queue view
- [ ] Now-playing display and modeline indicator (maybe extra)
- [ ] Lyrics support
- [ ] Global live search with Consult (extra)
- [ ] Offline caching
Elfin is licensed under the GNU General Public License v3.0.