Open andrewgdunn opened 3 months ago
Hello, I have to say I have not been using mpdscribble for quite some time now. I currently use yams with my docker image on a daily basis and it works. However, do the files you are playing come from the mpd library or from some other source, like a upnp media server?
If you are using upnp, last time I tried, the problem was with missing "duration" of the song. Scrobbling was therefore not possible using mpdscribble. However I just tested the "embedded" mpdscribble with an mpd instance with its own library and I can see my scrobbles. If you are not using upnp, maybe there's some other issue, in this case please post your compose file and/or any relevant information.
Not using upnp, just mpd. I'm trying to build up a pod with upnp to ultimately play from a subsonic instance (navidrome) and qobuz). Right now I just have mpd in the pod.
[tune@muckle ~]$ cat ~/.config/systemd/user/pod-upmpd.service
# pod-upmpd.service
[Unit]
Description=Podman pod-upmpd.service
Documentation=man:podman-generate-systemd(1)
Wants=network-online.target
After=network-online.target
RequiresMountsFor=/run/user/3100/containers
Wants=container-mpd.service
Before=container-mpd.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
TimeoutStopSec=70
ExecStartPre=/usr/bin/podman pod create \
--infra-conmon-pidfile %t/pod-upmpd.pid \
--pod-id-file %t/pod-upmpd.pod-id \
--exit-policy=stop \
--name upmpd \
--publish 6600:6600/tcp \
--replace
ExecStart=/usr/bin/podman pod start \
--pod-id-file %t/pod-upmpd.pod-id
ExecStop=/usr/bin/podman pod stop \
--ignore \
--pod-id-file %t/pod-upmpd.pod-id \
-t 10
ExecStopPost=/usr/bin/podman pod rm \
--ignore \
-f \
--pod-id-file %t/pod-upmpd.pod-id
PIDFile=%t/pod-upmpd.pid
Type=forking
[Install]
WantedBy=default.target
[tune@muckle ~]$ cat ~/.config/systemd/user/container-mpd.service
# container-mpd.service
[Unit]
Description=Podman container-mpd.service
Documentation=man:podman-generate-systemd(1)
Wants=network-online.target
After=network-online.target
RequiresMountsFor=%t/containers
BindsTo=pod-upmpd.service
After=pod-upmpd.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
TimeoutStopSec=70
ExecStart=/usr/bin/podman run \
--cidfile=%t/%n.ctr-id \
--cgroups=no-conmon \
--rm \
--pod-id-file %t/pod-upmpd.pod-id \
--sdnotify=conmon \
--detach \
--replace \
--name=mpd \
--group-add keep-groups \
--privileged \
--device /dev/snd/ \
--env ALSA_OUTPUT_CREATE=yes \
--env ALSA_OUTPUT_ENABLED=yes \
--env ALSA_OUTPUT_DEVICE=hw:Modius \
--env ALSA_OUTPUT_NAME=Modius \
--env ALSA_OUTPUT_MIXER_TYPE=hardware \
--env LASTFM_USERNAME="<EMAIL>" \
--env LASTFM_PASSWORD="<PASSWORD" \
--env SCRIBBLE_VERBOSE=2 \
--volume /zfs/safe/tune/mpd/database:/db:Z \
--volume /zfs/safe/tune/mpd/playlists:/playlists:Z \
--mount type=bind,source=/zfs/alten/tune/,destination=/music,ro=true giof71/mpd-alsa
ExecStop=/usr/bin/podman stop \
--ignore -t 10 \
--cidfile=%t/%n.ctr-id
ExecStopPost=/usr/bin/podman rm \
-f \
--ignore -t 10 \
--cidfile=%t/%n.ctr-id
Type=notify
NotifyAccess=all
[Install]
WantedBy=default.target
Hello, I noticed you correctly set SCRIBBLE_VERBOSE=2. Can you post the mpscribble logs? Also, from inside the mpd container, when playing, can you post the output of
mpc current -f %file%
For docker I would do something like
docker exec -it mpd bash
then send the command from the terminal. I'm sure you know how to do that with your containers (I cannot be sure I would know it with podman)
One thing to check, mpdscribble expects to be able to connect to mpd using "localhost" as the address. The port of course can be specified and defaults to 6600. This should be ok with bridged networking as well as with host networking in docker. Do you think this is compatibile with your podman configuration? It currently not configurable.
I correct myself, it's configurable using SCROBBLER_MPD_HOSTNAME
Hello, did you solve the issue? p.s. I am making progress with the listenbrainz-mpd docker image!
Apologies for the long delay!
I currently use yams with my docker image on a daily basis and it works.
I'll likely do this, I put in an issue on that project because it seems to exit before I can authenticate.
One thing to check, mpdscribble expects to be able to connect to mpd using "localhost" as the address. The port of course can be specified and defaults to 6600. This should be ok with bridged networking as well as with host networking in docker.
Nearly positive the pod created by podman would facilitate this working.
While playing music:
[tune@muckle mpd]$ podman exec -it mpd mpc current -f %file%
Artists/Ray LaMontagne/Ray LaMontagne - God Willin' & The Creek Don't Rise (2010) [FLAC 16bit 44kHz]/06 This Love Is Over.flac
I correct myself, it's configurable using SCROBBLER_MPD_HOSTNAME
I attempted setting this to mpd
(the container name) and to 127.0.0.1
but it doesn't appear to resolve the issue.
I can also see that songs get fully "played" in the logs:
player: played "Artists/Ray LaMontagne/Ray LaMontagne - God Willin' & The Creek Don't Rise (2010) [FLAC 16bit 44kHz]/03 God Willin' & the Creek Don't Rise.flac"
Hello, thank you for verifying with mpc. Of course mpdscribble should work, the file is local, I assume it has title and artist tags, so I don't see why it should not work.
The unusual thing of the scrobbler feature included in mpd-alsa-docker is that the script will launch the scrobbler in the background before launching mpd.
Can you verify that a mpdscribble process is actually running?
Can you verify that a mpdscribble process is actually running?
How would I check? ps
and top
not in the image right?
no they are not available, but you can install them running a bash in the running container and issuing these:
apt-get update apt-get install -y procps
of course this won't work if the app is run with a --user switch or podman equivalent.
anyway, the process should be also visible from the host machine, so just run a
ps aux | grep mpdscribble
from the host, and the process should appear. Double check that a
ps aux | grep mpd
actually returns something.
Indeed it appears to be running (both mpd and mpdscribble). I'm on discord (navidrome server) if you wanted to interactively troubleshoot.
I'm here also. I am quite a noob on discord. Chat me if you find me!
For other users watching this thread (if any): we did not talk about this specific issue.
I still can't figure out what is happening. I would ask you two things:
Thank you
Apologies if this isn't broken. I set the envar(s) on my instance and it looks like it's reading from the mpd playback but not submitting to lastfm. During container instancing I see:
I can also see that it's internally seeing the playback:
However I never see submissions to last.fm? I also noticed that https://post.audioscrobbler.com/ has a text page that suggest redirection to http://www.audioscrobbler.net/ ?