Skip to content

Commit

Permalink
Disable use of cache by default. Possibly fixes issue dtcooper#3.
Browse files Browse the repository at this point in the history
  • Loading branch information
dtcooper committed Jul 4, 2017
1 parent 5a15007 commit 1749a98
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion raspotify/etc/default/raspotify
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#BITRATE="160"

# Additional command line arguments for librespot can be set below.
# See `librespot -h' for more info.
# See `librespot -h` for more info.
#
# To make your device visible on Spotify Connect across the Internet add your
# username and password which can be set via "Set device password", on your
Expand All @@ -17,3 +17,7 @@
# use `--device` with something like `--device hw:0,1`. Your mileage may vary.
#
#OPTIONS="--username <USERNAME> --password <PASSWORD>"

# Uncomment to use a cache for downloaded audio files. It's best to leave this
# as-is since permissions are properly set on directory `/var/cache/raspotify'.
#CACHE_ARGS="--cache /var/cache/raspotify"
3 changes: 2 additions & 1 deletion raspotify/lib/systemd/system/raspotify.service
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ PermissionsStartOnly=true
ExecStartPre=/bin/mkdir -p 0755 /var/cache/raspotify ; /bin/chown raspotify:raspotify /var/cache/raspotify
Environment="DEVICE_NAME=raspotify (%H)"
Environment="BITRATE=160"
Environment="CACHE_ARGS=--disable-audio-cache"
EnvironmentFile=-/etc/default/raspotify
ExecStart=/usr/bin/librespot --name ${DEVICE_NAME} --backend alsa --cache /var/cache/raspotify --bitrate ${BITRATE} $OPTIONS
ExecStart=/usr/bin/librespot --name ${DEVICE_NAME} --backend alsa --bitrate ${BITRATE} $CACHE_ARGS $OPTIONS

[Install]
WantedBy=multi-user.target

0 comments on commit 1749a98

Please sign in to comment.