simplesonic

command module
v0.0.0-...-01672e9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2022 License: GPL-3.0 Imports: 37 Imported by: 0

README

Simplesonic

  • minimalistic Subsonic server API implementation written in Go
  • database free (browsing by folder structure)
  • external go package free (using only standard library)
  • jukebox support with MPD
  • m3u support with extended directives
  • tested on dsub, subsonic
  • for a more feature-rich server, use: gonic, airsonic, or ampache

Configuration

Simplesonic config file (/etc/simplesonic/simplesonic.json or ~/.config/simplesonic/simplesonic.json)
{
  "server": {
    "listenAddress": ":4040"
    "tlsKey": "simplesonic.key"
    "tlsCert": "simplesonic.crt",
  },
  "musicFolders": [
    {
      "name": "Music",
      "path": "/path/to/music"
    },
    {
      "name": "Other",
      "path": "/some/other/folder"
    }
  ],
  "playlistFolder": "/path/to/playlist",
  "users": [
    {
      "username": "alice",
      "password": "********"
    }
  ],  
  "mpd": {
    "unixSocket": "/var/run/mpd.sock"
  }
}
Generate self-signed TLS certificate
$ openssl genrsa -out simplesonic.key 2048
$ openssl req -new -x509 -sha256 -key simplesonic.key -out simplesonic.crt -days 3650
Minimal MPD config file (/etc/mpd.conf or ~/.config/mpd/mpd.conf)

Do not set db_file or music_directory!

bind_to_address    "/var/run/mpd.sock"

input {
        plugin     "curl"       
}

audio_output {                                                                                                                                                                                                                                                                              
        type       "alsa"
        name       "ALSA sound card"
}
music
└── Artist
    └── 1990-Album
        ├── 01-Some_track.mp3
        ├── 02-Some_other_track.mp3
        ├── ...
        ├── album.m3u8                            (optional)
        └── folder.jpg                            (optional)       
Example album.m3u8 file
#EXTM3U
#PLAYLIST:Black Ice musicbrainz="701340f6-dea7-3f37-acb6-808950f5299b" lastfm="AC%2FDC/Black+Ice" discogs="8540" spotify="7qVfz4UGONwEd5nQjj0ESN"
#EXTART:AC/DC
#EXTALB:Black Ice (2008)
#EXTGENRE:Rock
#EXTIMG:front cover
folder.jpg
#EXTINF:261 bitrate="320",Rock N Roll Train
01-Rock_N_Roll_Train.mp3
#EXTINF:214 bitrate="320",Skies on Fire
02-Skies_on_Fire.mp3
...

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL