• Stars
    star
    1,062
  • Rank 43,462 (Top 0.9 %)
  • Language
    Go
  • License
    GNU General Publi...
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

music streaming server / subsonic server API implementation

FLOSS alternative to subsonic, supporting its many clients

libera.chat #gonic

features

  • browsing by folder (keeping your full tree intact) see here
  • browsing by tags (using taglib - supports mp3, opus, flac, ape, m4a, wav, etc.)
  • on-the-fly audio transcoding and caching (requires ffmpeg) (thank you spijet)
  • jukebox mode (thank you lxea)
  • support for podcasts (thank you lxea)
  • pretty fast scanning (with my library of ~27k tracks, initial scan takes about 10m, and about 5s after incrementally)
  • multiple users, each with their own transcoding preferences, playlists, top tracks, top artists, etc.
  • last.fm scrobbling
  • listenbrainz scrobbling (thank you spezifisch, lxea)
  • artist similarities and biographies from the last.fm api
  • multiple genre support (see GONIC_GENRE_SPLIT to split tag strings on a character, eg. ;, and browse them individually)
  • a web interface for configuration (set up last.fm, manage users, start scans, etc.)
  • support for the album-artist tag, to not clutter your artist list with compilation album appearances
  • written in go, so lightweight and suitable for a raspberry pi, etc. (see ARM images below)
  • newer salt and token auth
  • tested on airsonic-refix, symfonium, dsub, jamstash, sublime music, soundwaves, stmp, strawberry, and ultrasonic

installation

the default login is admin/admin.
password can then be changed from the web interface

...from source

https://github.com/sentriz/gonic/wiki/installation#from-source

...with docker

https://github.com/sentriz/gonic/wiki/installation#with-docker

...with systemd

https://github.com/sentriz/gonic/wiki/installation#with-systemd

...elsewhere

configuration options

env var command line arg description
GONIC_MUSIC_PATH -music-path path to your music collection (see also multi-folder support below)
GONIC_PODCAST_PATH -podcast-path path to a podcasts directory
GONIC_PLAYLISTS_PATH -playlists-path path to new or existing directory with m3u files for subsonic playlists. items in the directory should be in the format <userid>/<name>.m3u. for example the admin user could have 1/my-playlist.m3u. gonic create and make changes to these playlists over the subsonic api.
GONIC_CACHE_PATH -cache-path path to store audio transcodes, covers, etc
GONIC_DB_PATH -db-path optional path to database file
GONIC_HTTP_LOG -http-log optional http request logging, enabled by default
GONIC_LISTEN_ADDR -listen-addr optional host and port to listen on (eg. 0.0.0.0:4747, 127.0.0.1:4747) (default 0.0.0.0:4747)
GONIC_TLS_CERT -tls-cert optional path to a TLS cert (enables HTTPS listening)
GONIC_TLS_KEY -tls-key optional path to a TLS key (enables HTTPS listening)
GONIC_PROXY_PREFIX -proxy-prefix optional url path prefix to use if behind reverse proxy. eg /gonic (see example configs below)
GONIC_SCAN_INTERVAL -scan-interval optional interval (in minutes) to check for new music (automatic scanning disabled if omitted)
GONIC_SCAN_AT_START_ENABLED -scan-at-start-enabled optional whether to perform an initial scan at startup
GONIC_SCAN_WATCHER_ENABLED -scan-watcher-enabled optional whether to watch file system for new music and rescan
GONIC_JUKEBOX_ENABLED -jukebox-enabled optional whether the subsonic jukebox api should be enabled
GONIC_JUKEBOX_MPV_EXTRA_ARGS -jukebox-mpv-extra-args optional extra command line arguments to pass to the jukebox mpv daemon
GONIC_PODCAST_PURGE_AGE -podcast-purge-age optional age (in days) to purge podcast episodes if not accessed
GONIC_GENRE_SPLIT -genre-split optional a string or character to split genre tags on for multi-genre support (eg. ;)
GONIC_EXCLUDE_PATTERN -exclude-pattern optional files matching this regex pattern will not be imported

screenshots

multiple folders support (v0.15+)

gonic supports multiple music folders. this can be handy if you have your music separated by albums, compilations, singles. or maybe 70s, 80s, 90s. whatever.

if you're running gonic with the command line, stack the -music-path arg

$ gonic -music-path /path/to/albums -music-path /path/to/compilations

if you're running gonic with ENV_VARS, or docker, try separate with a comma

GONIC_MUSIC_PATH=/path/to/albums,/path/to/compilations

if you're running gonic with the config file, you can repeat the music-path option

music-path /path/to/albums
music-path /path/to/compilations

after that, most subsonic clients should allow you to select which music folder to use. queries like show me "recently played compilations" or "recently added albums" are possible for example.

directory structure

when browsing by folder, any arbitrary and nested folder layout is supported, with the following caveats:

  • Files from the same album must all be in the same folder
  • All files in a folder must be from the same album

please see here for more context

music
β”œβ”€β”€ drum and bass
β”‚Β Β  └── Photek
β”‚Β Β      └── (1997) Modus Operandi
β”‚Β Β          β”œβ”€β”€ 01.10 The Hidden Camera.flac
β”‚Β Β          β”œβ”€β”€ 02.10 Smoke Rings.flac
β”‚Β Β          β”œβ”€β”€ 03.10 Minotaur.flac
β”‚Β Β          └── folder.jpg
└── experimental
    └── Alan Vega
        β”œβ”€β”€ (1980) Alan Vega
        β”‚Β Β  β”œβ”€β”€ 01.08 Jukebox Babe.flac
        β”‚Β Β  β”œβ”€β”€ 02.08 Fireball.flac
        β”‚Β Β  β”œβ”€β”€ 03.08 Kung Foo Cowboy.flac
        β”‚Β Β  └── folder.jpg
        └── (1990) Deuce Avenue
            β”œβ”€β”€ 01.13 Body Bop Jive.flac
            β”œβ”€β”€ 02.13 Sneaker Gun Fire.flac
            β”œβ”€β”€ 03.13 Jab Gee.flac
            └── folder.jpg

More Repositories

1

betanin

beets based mitm of your torrent client and music player
Python
322
star
2

fish-pipenv

🐟🐍 a fish plugin that automatically activates the pipenv subshell
Shell
200
star
3

cliphist

wayland clipboard manager
Go
161
star
4

wlr-sunclock

wayland desktop widget to show to the sun's shadows on earth
C
44
star
5

vim-print-debug

assisted printf debugging for vim
Vim Script
38
star
6

dotfiles

my dotfiles
Shell
18
star
7

standardnotes-extensions

auto updating extensions for your standardnotes server
Go
17
star
8

socr

screenshot OCR server
Go
11
star
9

socr-cli

searchable auto generated screenshot ocr database
Python
9
star
10

compose-status

simple home server status page, compose and traefik aware
Go
8
star
11

wl-gammactld

a daemon for wl-gammactl
Shell
7
star
12

bandcamp_downloader

a python 3+ script for downloading, renaming, and tagging albums from Bandcamp
Python
6
star
13

vi-pipe

edit text in the middle of a shell pipeline, and store a diff to replay changes after further invocations
Go
5
star
14

hexchat_python_addons

a python 3+ collection of HexChat addons
Python
5
star
15

reboodt

a python 3+ IRC bot
Python
4
star
16

cliphist-sh

wayland clipboard manager
Shell
4
star
17

rsl

reserialise: lossy but versatile conversion between data serialisation formats
Go
3
star
18

honk-docker

docker image for honk
Dockerfile
3
star
19

nvim-lsp-compose

compose language servers, and formatters / linters via efm in a language * feature matrix
Lua
2
star
20

beside

unix pipeline stage with before and after preview
Go
1
star
21

go-filelock

Go
1
star
22

log-proxy

a reverse proxy to a single address, logging request and response bodies
Go
1
star
23

xyz

personal jekyll website
Sass
1
star