- Anh nhớ chạy systemctl stop spotifyd trước khi edit spotifyd.conf. Và stop trước mỗi lần start.em bị lỗi bái @tml3nr
[global]
username = xxx
password = xxx
backend = alsa
device = hw:0 # Given by `aplay -L`
mixer = Digital
volume-control = alsa # or alsa_linear, or softvol
#onevent = command_run_on_playback_event
device_name = RuneAudio
bitrate = 320
#cache_path = /tmp/spotifyd
volume-normalisation = false
#normalisation-pregain = -10
audio_output {
name "BossDAC"
type "alsa"
device "hw:0,0"
root@runeaudio(rw):~# systemctl status -l spotifyd
● spotifyd.service - A spotify playing daemon
Loaded: loaded (/usr/lib/systemd/system/spotifyd.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2019-04-22 20:19:32 ICT; 2min 3s ago
Docs: https://github.com/Spotifyd/spotifyd
Main PID: 4691 (spotifyd)
Tasks: 3 (limit: 512)
CGroup: /system.slice/spotifyd.service
└─4691 /usr/bin/spotifyd --no-daemon
Apr 22 20:19:32 runeaudio systemd[1]: Started A spotify playing daemon.
Apr 22 20:19:32 runeaudio spotifyd[4691]: 20:19:32 [INFO] Using alsa volume controller.
Apr 22 20:19:32 runeaudio spotifyd[4691]: 20:19:32 [WARN] Failed to register IPv6 receiver: Os { code: 97, kind: Other, message: "Address family not supported by protocol" }
Apr 22 20:19:32 runeaudio spotifyd[4691]: 20:19:32 [INFO] Connecting to AP "gae2-accesspoint-a-26lh.ap.spotify.com:443"
Apr 22 20:19:33 runeaudio spotifyd[4691]: 20:19:33 [INFO] Authenticated as "xxxxxxx" !
Apr 22 20:19:33 runeaudio spotifyd[4691]: 20:19:33 [INFO] Using alsa sink
Apr 22 20:19:33 runeaudio spotifyd[4691]: 20:19:33 [INFO] Country: "VN"
Có 2 cách ạ:Bác @tml3nr cho hỏi cách Extract file spotifyd vào /usr/bin với
moode anh set như vầy thì nó sẽ lấy được quyền root:Em đang dùng moodeaudio, trên digione
1. device = xxxTiện thể cho em hỏi luôn là digione thì:
device = xxx # Given by `aplay -L`
mixer = xxx
thì đặt như thế nào cho đúng
Anh xem mục device trong mpd.conf. Nếu nó là hw:0,0 thì trong spotifyd.conf sẽ là hw:0Aplay -L nó ra nhw này anh:
default:CARD=sndallodigione
snd_allo_digione,
Default Audio Device
sysdefault:CARD=sndallodigione
snd_allo_digione,
Default Audio Device
dmix:CARD=sndallodigione,DEV=0
snd_allo_digione,
Direct sample mixing device
dsnoop:CARD=sndallodigione,DEV=0
snd_allo_digione,
Direct sample snooping device
hw:CARD=sndallodigione,DEV=0
snd_allo_digione,
Direct hardware device without any conversions
plughw:CARD=sndallodigione,DEV=0
snd_allo_digione,
Hardware device with all software conversions
CÓ phải là chọn dòng nay: hw:CARD=sndallodigione,DEV=0 đúng không anh.
của em nó báo tại dòng --no-daemon . . .
Anh nhắn teamview em mò thửcủa em nó báo tại dòng --no-daemon . . .
Sorry anh hôm quá em té sớm. Vậy hôm nay khi nào anh rãnh mình xà quần tiếp ạid : 1 254 653 123
pass : gv6m86
root@runeaudio(rw):~# spotifyd --help
Usage: spotifyd [options]
Options:
-c, --config CONFIG Path to a config file.
-u, --username USERNAME
Spotify user name.
-p, --password PASSWORD
Spotify password.
--device DEVICE Audio device, given by aplay -L.
--mixer DEVICE Audio mixer
--bitrate DEVICE
Any of 96, 160, and 320.
--pid PID-FILE Path to PID file.
--device_name DEVICE
Name of this Spotify device.
--backend BACKEND
Audio backend.
--cache_path PATH
Path to cache location.
--volume-normalisation
Apply volume normalisation per track.
--normalisation-pregain PREGAIN
dB of pregain for volume normalisation
--onevent COMMAND
Run a command on events. Environment variables
PLAYER_EVENT, TRACK_ID,OLD_TRACK_ID are passed to the
command.
--volume-control CONTROLLER
Possible values are alsa, alsa_linear, and softvol.
-v, --verbose Add debug information to log.
--no-daemon Don't detach from console.
--backends List available audio backends.
-h, --help Print this help text.
#!/bin/bash
case "$PLAYER_EVENT" in
start)
# Stop mpd
systemctl stop mpd
exit
;;
stop)
# Start mpd
systemctl start mpd
exit
;;
esac
exit 0
[Unit]
Description=A spotify playing daemon
Documentation=https://github.com/Spotifyd/spotifyd
Wants=sound.target
After=sound.target
Wants=network-online.target
After=network-online.target
[Service]
ExecStart=/usr/bin/spotifyd --no-daemon --onevent /home/root/spotifyd_event.sh
Restart=always
RestartSec=12
[Install]
WantedBy=default.target
systemctl daemon-reload
systemctl stop spotifyd
systemctl start spotifyd