Skip to content
Senan Kelly edited this page Jun 26, 2024 · 6 revisions

smart playlists

use the beets smart playlists plugin https://beets.readthedocs.io/en/stable/plugins/smartplaylist.html

plugins:
  - smartplaylist

smartplaylist:                                                                                                                   
  playlist_dir: /<path to gonic playlists>/<user id>/                                                    
  playlists:                                                                     
    - name: "label chain reaction.m3u"                                           
      query: 'label:"Chain Reaction"'                                            
    - name: "label echospace.m3u"                                                
      query: "label:Echospace"                                                   
    - name: "90s detroit.m3u"                                                    
      query: "genre:detroit year:..2000 year+"                                   
    - name: "90s electronic gt 20 plays.m3u"                                     
      query: "genre:electronic ^genre:rock play_count:10.. year:..2000 play_count+"

jukebox multi room audio

can be achieved with snapcast and the subsonic jukebox mode

following https://github.com/badaix/snapcast/blob/master/doc/player_setup.md#mpv

start gonic with -jukebox-mode-mpv-extra-args "--ao=pcm --ao-pcm-file=path/to/my-pipe"

or GONIC_JUKEBOX_MODE_MPV_EXTRA_ARGS="--ao=pcm --ao-pcm-file=path/to/my-pipe"

bi-directional sync of stars to last.fm

see https://github.com/sentriz/gonic-lastfm-sync/

run jukebox as a podman systemd unit (rootless, pipewire):

edit the Dockerfile to add the pipewire package and run podman build -t gonic .

create the directories: mkdir -p ~/.gonic/{data,playlists,podcasts,cache}

create ~/.config/containers/systemd/gonic.container: (replace <DIRECTORY> and <PORT> as needed):

[Unit]
Description=Gonic
After=network.target sound.target

[Container]
Image=localhost/gonic:latest

Volume=<DIRECTORY>:/music:ro

Volume=%h/.gonic/data:/data
Volume=%h/.gonic/playlists:/playlists
Volume=%h/.gonic/podcasts:/podcasts
Volume=%h/.gonic/cache:/cache

PublishPort=<PORT>:80

Volume=/run/user/%U/pipewire-0:/tmp/pipewire-0
Environment=PIPEWIRE_RUNTIME_DIR=/tmp
Environment=GONIC_JUKEBOX_ENABLED=true

[Install]
WantedBy=default.target

finally, run systemctl --user daemon-reload && systemctl --user start gonic