A command line MP3 player for your Restic repository.
- Index and play available audio files (flac, mp3, ogg)
- ID3 metadata support
- Search your music collection (filename or ID3 tag)
- Support for indexing multiple Restic repositories
- Random, endless playback
- Optionally fetch missing song metadata (artist, album, etc) from Internet (see ACOUSTICID.md)
- macOS and Linux supported
Binaries for Linux are available in the releases page.
You'll need to build from source for macOS and other Linux architectures:
GO111MODULE=on go get -u github.com/rubiojr/rplay
Or clone the repository and run go build
.
RPlay does not encrypt the index created (locally, where rplay runs), meaning that the following information from your Restic repository will be available to those with access to the index:
- Audio file names and ID3 metadata
- Audio file contents (cached locally for playback and other things)
- Repository ID
- Restic (packed)blob metadata (the SHA256 of the Packfile where the blob is stored, blob length, offset within the pack file)
- Last file modification time (mtime)
- Hostname where the file was backed up
- Full file path when it was backed up
The first thing we need to do, is to index the repository:
Indexing yields some stats while indexing:
⢿ Taco Tuesday.mp3 🎯 62 new, 0 skipped, 0 errors, 11 f/s, 0.02 minutes left
file being indexed, indexed files count, already indexed, indexing speed, remaining time
and when the indexing process finishes:
💥 74 indexed, 0 already present. Took 5 seconds.
Worth noting also that RPlay accepts the same repository (the -r
flag) URIs and backends Restic does, which means S3, rest-server, Backblaze, etc are all supported.
The indexing process will create an index in a OS specific path:
Linux
~/.local/share/rplay
MacOS
~/Library/Application Support/rplay
The search
command will search our indexed files (filename searching only for now):
Once we have indexed our repository, we're ready to play:
The play command also supports playing a specific file:
$ rplay -r rest:http://localhost:8000 search "*playa*"
Searching for *playa*...
ID: e6a9a3e7e630744cd6bcfd0820a25f7b9b467c5d472f7d0f1bd443103f1fa35c
Album: La Playa
Artist: DJ ALEX
Filename: La Playa.mp3
Genre: unknown
Title: La Playa
Year: 20190718
rplay -r rest:http://localhost:8000 play e6a9a3e7e630744cd6bcfd0820a25f7b9b467c5d472f7d0f1bd443103f1fa35c
Playing e6a9a3e7e630744cd6bcfd0820a25f7b9b467c5d472f7d0f1bd443103f1fa35c...
⣾ Next song found, loading...
album: La Playa
artist: DJ ALEX
filename: La Playa.mp3
genre:
title: La Playa
year: 20190718
RPlay supports configuring Restic's repository location and credentials via environment variables, so you don't have to type the URI and password all the time:
export RESTIC_REPOSITORY=rest:http://localhost:8000
export RESTIC_PASSWORD=secret
- Better curses UI
- Flag songs as hidden/unwanted
RPlay is an experiment quickly built in a few days thanks to the following projects that power it: