Giter VIP home page Giter VIP logo

mpdas's People

Contributors

agjacome avatar depressed-pho avatar diogocp avatar dogsleg avatar ephemeralriggs avatar hrkfdn avatar intelfx avatar jrdnull avatar massdosage avatar ninavdl avatar quite avatar shizeeg avatar thereverend403 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mpdas's Issues

Scrobbled tracks not saving

"Scrobbling now" updates correcty after each track change, but scrobbled tracks are never saved to the last.fm site.

(11:28:53) [INFO] Using Last.fm service URL
(11:28:53) [INFO] Connected to MPD.
(11:28:54) [INFO] Last.fm handshake successful. SessionID: TqyraLxkocHe57A6N1WvCR5ssT_w2mVN
(11:28:54) [INFO] New song: Charles Bronson - Debate Team Bake Sale
(11:28:55) [INFO] Updated "Now Playing" status successfully.
(11:28:56) [INFO] Scrobbling: Charles Bronson - Debate Team Bake Sale
(11:28:56) [INFO] Scrobbled successfully.

Using Raspbian 8.

Scrobbled tracks not saving

Mpdas scrobbles the current song, but as soon as the song changes it doesn't save on Last.FM. Is there a fix for this?

Authentication failed. Please check your login data.

I have tried both with my password in cleartext, and md5 hashed as was previously used. Every run results in

(20:05:53) [INFO] Using Last.fm service URL
(20:05:53) [INFO] Connected to MPD.
(20:05:54) [ERROR] Code: 4
(20:05:54) [ERROR] Authentication failed. Please check your login data.
(20:05:54) [INFO] Closing mpdas.

I have confirmed the details are correct, and have made sure its not due to different config being used. I suspect it may be due to my password having symbols in it that may be breaking the config parsing.

No error when mpdpassword is not supplied or incorrect

When mpdas is connecting to a mpd server that requires a password and the password is wrong, mpdas prints that it could not connect to MPD and shuts down:

(21:08:10) [ERROR] Could not connect to MPD.
(21:08:10) [INFO] Closing mpdas.

However, if NO mpdpassword is specified and mpdas is connecting to a mpd server that requires a password, mpdas continues running and doesn't print an error:

(21:07:50) [INFO] Connected to MPD.
(21:07:50) [INFO] Last.fm handshake successful. SessionID: 42

It would be helpful if mpdas quit and logged an error if the mpdpassword is needed but not supplied.

Tested with mpd 0.18.4 on ArchLinux

Really pleased with mpdas though - i just ran into this and wanted to let you know about it. Thanks for mpdas!

Fails only when run by systemd

I'm getting this error:

mpdas[4887]: terminate called after throwing an instance of 'std::logic_error'
mpdas[4887]:   what():  basic_string::_M_construct null not valid

Only when I run mpdas inside a systemd service. But when I run it manually I don't get it :/

Any idea how to debug this? Google didn't help much...

Allow specifying a list of excluded artists

I have an MPD server hooked up to a hi-fi which has both mine and my girlfriends music on. Thing is, I don't really want her artists getting scrobbled to my account. She doesn't have much music so it would be easy for me to specify a list of artists that mpdas could ignore.

What do you think?

Question: what is the minimum version of mpd supported.

I currently use mpdas 0.3.0 and would like to upgrade to 0.4.0, but my primary mpd server is on a RaspberryPi with a relatively up to date Raspbian distribution:

*distribution="Debian"
*distversion="7.6"
*kernel="3.12.28+"
*architecture="armv6l"

The mpd version provided is 0.16.7, and is unlikely to change until they upgrade to the next version of Debian.

Given that the mpd version is fairly old, what is the minimal mpd version expectation of mpdas?

I do not want to update mpdas and find my mpd version is not supported.

mpdas can't connect to mpd

mpdas stopped working after updating it because it can't find my config file. I've upgraded to a build of the latest master branch.

Seems like mpdas can't connect to mpd at all.

I'm running mpd version 0.21.11 together with the latest mpdas build from master. I'm starting mpd and mpdas with a systemd user service, but I'm also experiencing this if I just run mpd and mpdas from my shell. This is the error I'm getting.

(21:15:06) [ERROR] You are not root. Not changing user ..
(21:15:06) [INFO] Using Libre.fm service URL
(21:15:06) [ERROR] Could not connect to MPD.
(21:15:06) [INFO] Closing mpdas.

Error code 13

Since the new password commit (so since a month+ ago) I get the following erro when launching mpdas:

(15:51:57) [ERROR] Code: 13
(15:51:57) [ERROR] Invalid method signature.

My config:

#
# /etc/mpdas.conf: mpdas configuration
#

# Last.fm username and password
username = onodera-punpun
password = password

# The user mpdas runs as
user "mpd"

# End of file

I launch mpdas using -c /etc/mdpas.conf. Oh and I also use libressl, that might have something to do with it.

"Authentication failed. Please check your login data."

Since weeks all I'm getting is

[INFO] Connected to MPD.
[ERROR] Code: 4
[ERROR] Authentication failed. Please check your login data.
[INFO] Closing mpdas.

The configuration file, which had worked for months, contains nothing but my username and the hashed password.

I've tried recompiling and updating mpdas and its dependencies, no change.

Password doesn't work.

Since the last release (when the password switched from md5 to plain) my password no longer works (and yes, I'm using a plain password now :)).

I thing the fact that I use symbols such as [@>:-&... in my password causes this.

new last.fm beta site rejecting my mpdas login

A day or two ago I was forced to the new last.fm beta site and my mpdas scrobbling stopped working.

I have not changed my .mpdasrc. Are they using something other than an MD5 hashed password now? I also noticed I had to use my email address to login to last.fm, not my original last.fm user name. I tried switching to my email address in the mpdasrc, but that did not work either.

$ /usr/local/bin/mpdas
(15:30:12) [INFO] Config file (/usr/local/etc/mpdasrc) does not exist or is not readable.
(15:30:12) [INFO] Connected to MPD.
(15:30:16) [ERROR] Code: 4
(15:30:16) [ERROR] Authentification failed. Please check your login data.
(15:30:16) [INFO] Closing mpdas.

Anyone has issues with the new site?

[FEATURE REQUEST] Consider XDG config directory

Hi,

would it be possible for mpdas to use XDG_CONFIG_HOME or fall back to its default if it's not set (/home/user/.config/) ?

It might be just my personal preference, but I like having all the config files in one directory compared to the current way where it's directly in the home directory. A lot of programs consider the XDG_CONFIG_HOME environment variable or just default straight to the ".config" directory in the home directory.

mpdas 0.4.3 checksum mismatch

URL:
https://www.50hz.ws/mpdas/mpdas-0.4.3.tar.gz

Expected SHA-256: 925089a1d395352c27df68b274b33258a09e334e784322e72dc064241aa2e075

Actual SHA-256:
069e368bde35b2b3bd79439052c863a0f8c3b25ed454b5ab51f84fa6878b674e

The expected checksum is what what we had in Homebrew for the SHA-256 when the formula was upgraded to version 0.4.3 on Mon Jul 3 12:05:54 2017 -0700. See Homebrew/homebrew-core#15256.

But currently downloading the file gives a different checksum.

I wanted to make sure you weren't hacked, and ask what the reason(s) for the changes were.

mpdas as daemon

it would be great to enjoy mpdas as daemon sending messages to syslog.

Unlike a track

Is it possible to issue something like:
mpc sendmessage mpdas unlove
to unlike a track?

Scrobble works on 'Artist' and not on 'Album Artist'?

I've noticed that this plugin scrobbles each track with the artist and not the album artist, so the scrobbles don't end up adding up to total plays of artist.

for example -
Feather by Nujabes scrobbles to artist Nujabes feat. Cise Star & AKIN instead of just Nujabes, thus Nujabes ends up having no plays throughout an entire album as there are so many features...

I searched around for a one liner in the settings to solve this problem but it doesn't seem to a option.... kinda seems like a no brainer to scrobble using Album Artist.

libcurl: timeout was reached after a period of inactivity

This looks like the same issue that was "fixed" in #33, but it doesn't fix it.
The only was to get it working again is to restart mpdas and then the cached scrobbles will be added, but again after about 10 minutes of inactivity, libcurl fails with the error code 28 and "Timeout was reached" and retrying doesn't help.

(17:48:14) [INFO] Cannot parse config file (/usr/local/etc/mpdasrc).
(17:48:14) [INFO] Cannot parse config file (/home/vojislav/.mpdasrc).
(17:48:14) [INFO] Using Last.fm service URL
(17:48:14) [INFO] Connected to MPD.
(17:48:14) [INFO] Last.fm handshake successful. SessionID: XrKSvK6ys1lY_dsr-VLe7SCQ87puHs1o
(17:48:14) [INFO] New song: Neutral Milk Hotel - I Will Bury You In Time
(17:48:14) [INFO] Updated "Now Playing" status successfully.
(18:01:15) [INFO] New song: MGMT - In The Afternoon
(18:01:25) [ERROR] libcurl error (28): Timeout was reached
(18:01:25) [ERROR] Will retry 3 times with a 3 second delay.
(18:01:28) [ERROR] Retry 1/3
(18:01:38) [ERROR] Failed: Timeout was reached
(18:01:41) [ERROR] Retry 2/3
(18:01:51) [ERROR] Failed: Timeout was reached
(18:01:54) [ERROR] Retry 3/3
(18:02:04) [ERROR] Failed: Timeout was reached
(18:09:46) [ERROR] Error scrobbling. Trying again in 5 minutes.

Using mpdas-0.4.5, curl 7.82.0 and libcurl 7.82.0

Unable to compile mpdas on OSMC

I'm trying to set up mpdas on OSMC on a Raspberry Pi to scrobble songs from MPD installed locally. I've downloaded the 0.4.4 source code and tried to run "make" on it. After installing various missing libraries it's now failing compilation with the following error:

osmc@osmc:~/temp/mpdas-0.4.4$ make
g++ pkg-config --cflags libmpdclient libcurl -DCONFDIR=""/usr/local/etc"" -DVERSION=""0.4.4"" -c -o main.o main.cpp
g++ pkg-config --cflags libmpdclient libcurl -DCONFDIR=""/usr/local/etc"" -DVERSION=""0.4.4"" -c -o md5.o md5.cpp
g++ pkg-config --cflags libmpdclient libcurl -DCONFDIR=""/usr/local/etc"" -DVERSION=""0.4.4"" -c -o utils.o utils.cpp
g++ pkg-config --cflags libmpdclient libcurl -DCONFDIR=""/usr/local/etc"" -DVERSION=""0.4.4"" -c -o mpd.o mpd.cpp
g++ pkg-config --cflags libmpdclient libcurl -DCONFDIR=""/usr/local/etc"" -DVERSION=""0.4.4"" -c -o audioscrobbler.o audioscrobbler.cpp
g++ pkg-config --cflags libmpdclient libcurl -DCONFDIR=""/usr/local/etc"" -DVERSION=""0.4.4"" -c -o cache.o cache.cpp
g++ pkg-config --cflags libmpdclient libcurl -DCONFDIR=""/usr/local/etc"" -DVERSION=""0.4.4"" -c -o config.o config.cpp
config.cpp: In function ‘int IniHandler(void*, const char*, const char*, const char*)’:
config.cpp:11:33: error: ‘std::string’ has no member named ‘front’
if(val.length() >= 2 && val.front() == '"' && val.back() == '"') {
^
config.cpp:11:56: error: ‘std::string’ has no member named ‘back’
if(val.length() >= 2 && val.front() == '"' && val.back() == '"') {
^
Makefile:19: recipe for target 'config.o' failed

Any ideas? Hopefully I'm missing something simple.

https by default?

I tried to change URL ws.audioscrobbler.com/2.0/ to https://
and it works good.
tcpdump shows that all connections are https

single mode not scrobbling

whenever songs are on single repeat mode, they never get scrobbled more than once. It's like the daemon doesn't detect the song replaying.

Mpdas always uses default config file

When a ~/.mpdasrc config file is present, the argument -c is ignored.
I have 2 mdp servers for different locations (the 'i' stands for 'iPod', from which I run a server when it's connected over USB). They run on different ports in order to be able to be run simultaneously. Here's some debug info:

file ~/.mpdasrc:

username = ...
password = ...
host = 127.0.0.1
port = 6600

file ~/.mpdasrci:

username = same
password = same
port = 6601
host = 127.0.0.1

$ mpdas -v
mpdas-0.3.0, (C) 2010 Henrik Friedrichsen.
Global config path is set to "/etc"

$ mpdas -c ~/.mpdasrci
Error in connection() 111 - Connection refused
(14:28:52) [ERROR] Could not connect to MPD.

OS: Linux Mint 17 cinnamon 64 bit, used the .deb to install

Memory leak in mpdas, or in libmpdclient?

I'm a user of mpdas, and observing the process growing slowly over time (it also seems to happen when I'm not playing anything in mpd, but I'm not certain of that).

I've run mpdas through valgrind for quiet some time, with the following result. Have to say I'm no expert in interpreting this. But when reading the relevant code in mpdas (also pasted below), it seems like the right things are done and freed...

==16708== 
==16708== HEAP SUMMARY:
==16708==     in use at exit: 84,345,057 bytes in 1,304,903 blocks
==16708==   total heap usage: 2,683,628 allocs, 1,378,725 frees, 1,628,698,875 bytes allocated
==16708== 
==16708== 13,360 bytes in 863 blocks are possibly lost in loss record 20 of 26
==16708==    at 0x4C28C10: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==16708==    by 0x5BD6E09: strdup (in /usr/lib/libc-2.22.so)
==16708==    by 0x4E41EA6: ??? (in /usr/lib/libmpdclient.so.2.0.10)
==16708==    by 0x4E423ED: mpd_song_feed (in /usr/lib/libmpdclient.so.2.0.10)
==16708==    by 0x4E426AA: mpd_recv_song (in /usr/lib/libmpdclient.so.2.0.10)
==16708==    by 0x4E3EA85: mpd_run_current_song (in /usr/lib/libmpdclient.so.2.0.10)
==16708==    by 0x4065BA: CMPD::Update() (in /usr/local/bin/mpdas)
==16708==    by 0x4039F0: main (in /usr/local/bin/mpdas)
==16708== 
==16708== 18,041 bytes in 203 blocks are possibly lost in loss record 21 of 26
==16708==    at 0x4C28C10: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==16708==    by 0x5BD6E09: strdup (in /usr/lib/libc-2.22.so)
==16708==    by 0x4E41D38: ??? (in /usr/lib/libmpdclient.so.2.0.10)
==16708==    by 0x4E42682: mpd_recv_song (in /usr/lib/libmpdclient.so.2.0.10)
==16708==    by 0x4E3EA85: mpd_run_current_song (in /usr/lib/libmpdclient.so.2.0.10)
==16708==    by 0x4065BA: CMPD::Update() (in /usr/local/bin/mpdas)
==16708==    by 0x4039F0: main (in /usr/local/bin/mpdas)
==16708== 
==16708== 47,680 bytes in 149 blocks are possibly lost in loss record 22 of 26
==16708==    at 0x4C28C10: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==16708==    by 0x4E41D24: ??? (in /usr/lib/libmpdclient.so.2.0.10)
==16708==    by 0x4E42682: mpd_recv_song (in /usr/lib/libmpdclient.so.2.0.10)
==16708==    by 0x4E3EA85: mpd_run_current_song (in /usr/lib/libmpdclient.so.2.0.10)
==16708==    by 0x4065BA: CMPD::Update() (in /usr/local/bin/mpdas)
==16708==    by 0x4039F0: main (in /usr/local/bin/mpdas)
==16708== 
==16708== 84,183,316 (54,879,360 direct, 29,303,956 indirect) bytes in 171,498 blocks are definitely lost in loss record 26 of 26
==16708==    at 0x4C28C10: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==16708==    by 0x4E41D24: ??? (in /usr/lib/libmpdclient.so.2.0.10)
==16708==    by 0x4E42682: mpd_recv_song (in /usr/lib/libmpdclient.so.2.0.10)
==16708==    by 0x4E3EA85: mpd_run_current_song (in /usr/lib/libmpdclient.so.2.0.10)
==16708==    by 0x4065BA: CMPD::Update() (in /usr/local/bin/mpdas)
==16708==    by 0x4039F0: main (in /usr/local/bin/mpdas)
==16708== 
==16708== LEAK SUMMARY:
==16708==    definitely lost: 54,879,360 bytes in 171,498 blocks
==16708==    indirectly lost: 29,303,956 bytes in 1,132,013 blocks
==16708==      possibly lost: 79,081 bytes in 1,215 blocks
==16708==    still reachable: 82,660 bytes in 177 blocks
==16708==         suppressed: 0 bytes in 0 blocks
==16708== Reachable blocks (those to which a pointer was found) are not shown.
==16708== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==16708== 
==16708== For counts of detected and suppressed errors, rerun with: -v
==16708== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
    mpd_status *status = mpd_run_status(_conn);
    mpd_stats *stats = mpd_run_stats(_conn);

    if(status && stats) {
        int newsongid = mpd_status_get_song_id(status);
        int newsongpos = mpd_status_get_elapsed_time(status);
        int curplaytime = mpd_stats_get_play_time(stats);
        mpd_song *song = mpd_run_current_song(_conn);

        // new song
        if(newsongid != _songid) {
            _songid = newsongid;
            _songpos = newsongpos;
            _start = curplaytime;

            if(song) {
                GotNewSong(song);
                mpd_song_free(song);
            }
        }

        // song playing
        if(newsongpos != _songpos) {
            _songpos = newsongpos;
            CheckSubmit(curplaytime);
        }

        // check for client-to-client messages
        if(mpd_send_read_messages(_conn)) {
            mpd_message *msg;
            while((msg = mpd_recv_message(_conn)) != NULL) {
                const char *text = mpd_message_get_text(msg);
                if(_gotsong && text && !strncmp(text, "love", 4))
                    AudioScrobbler->LoveTrack(_song);
                mpd_message_free(msg);
            }
            mpd_response_finish(_conn);
        }

        mpd_status_free(status);
        mpd_stats_free(stats);
    }
    else { // we have most likely lost our connection
        eprintf("Could not query MPD server: %s", mpd_connection_get_error_message(_conn));
        _connected = false;
    }

mpdas failing with error 6

my mpdas on a Raspberry Pi with raspbian began failing around Jul 3, 2014.

Did last.fm or mpd change something?

(14:58:11) [INFO] New song: Nelson Riddle - Night and Day
(14:58:12) [INFO] Updated "Now Playing" status successfully.
(15:01:19) [INFO] Scrobbling: -
(15:01:19) [ERROR] Last.fm returned an error while scrobbling:

Missing required parameter artist

(15:01:19) [ERROR] Code: 6
(15:01:19) [ERROR] Error scrobbling. Trying again in 5 minutes.
(15:01:19) [ERROR] Re-Handshaking!
(15:01:20) [INFO] Last.fm handshake successful. SessionID: c23b0f97b24674b576bd5b9c5471241e

compiling mpdas in buildroot

I have latest buildroot, and I got such mistake:

PATH="/root/buildroot-2017.11/buildroot/output/host/bin:/root/buildroot-2017.11/buildroot/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" /usr/bin/make -j5 PATH="/root/buildroot-2017.11/buildroot/output/host/bin:/root/buildroot-2017.11/buildroot/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" AR="/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-ar" AS="/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-as" LD="/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-ld" NM="/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-nm" CC="/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-gcc" GCC="/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-gcc" CPP="/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-cpp" CXX="/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-g++" FC="/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-gfortran" F77="/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-gfortran" RANLIB="/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-ranlib" READELF="/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-readelf" STRIP="/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-strip" OBJCOPY="/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-objcopy" OBJDUMP="/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-objdump" AR_FOR_BUILD="/usr/bin/ar" AS_FOR_BUILD="/usr/bin/as" CC_FOR_BUILD="/usr/bin/gcc" GCC_FOR_BUILD="/usr/bin/gcc" CXX_FOR_BUILD="/usr/bin/g++" LD_FOR_BUILD="/usr/bin/ld" CPPFLAGS_FOR_BUILD="-I/root/buildroot-2017.11/buildroot/output/host/include" CFLAGS_FOR_BUILD="-O2 -I/root/buildroot-2017.11/buildroot/output/host/include" CXXFLAGS_FOR_BUILD="-O2 -I/root/buildroot-2017.11/buildroot/output/host/include" LDFLAGS_FOR_BUILD="-L/root/buildroot-2017.11/buildroot/output/host/lib -Wl,-rpath,/root/buildroot-2017.11/buildroot/output/host/lib" FCFLAGS_FOR_BUILD="" DEFAULT_ASSEMBLER="/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-as" DEFAULT_LINKER="/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-ld" CPPFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os " CXXFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os " LDFLAGS="" FCFLAGS=" -Os " FFLAGS=" -Os " PKG_CONFIG="/root/buildroot-2017.11/buildroot/output/host/bin/pkg-config" STAGING_DIR="/root/buildroot-2017.11/buildroot/output/host/i586-buildroot-linux-musl/sysroot" INTLTOOL_PERL=/usr/bin/perl -C /root/buildroot-2017.11/buildroot/output/build/mpdas-0.4.4
make[1]: Entering directory '/root/buildroot-2017.11/buildroot/output/build/mpdas-0.4.4'
/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-g++ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o main.o main.cpp
/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-g++ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o md5.o md5.cpp
/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-g++ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o utils.o utils.cpp
/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-g++ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o mpd.o mpd.cpp
/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-g++ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o audioscrobbler.o audioscrobbler.cpp
/root/buildroot-2017.11/buildroot/output/host/bin/i586-buildroot-linux-musl-g++ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o cache.o cache.cpp
main.cpp: In function ‘void printversion()’:
main.cpp:48:30: error: expected ‘)’ before ‘VERSION’
fprintf(stdout, "mpdas-" VERSION", (C) 2010-2017 Henrik Friedrichsen.\n");
^~~~~~~
main.cpp:49:62: error: ‘CONFDIR’ was not declared in this scope
fprintf(stdout, "Global config path is set to "%s"\n", CONFDIR);
^~~~~~~
main.cpp:49:62: note: suggested alternative: ‘S_IFDIR’
fprintf(stdout, "Global config path is set to "%s"\n", CONFDIR);
^~~~~~~
S_IFDIR
Makefile:19: recipe for target 'main.o' failed
make[1]: *** [main.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/root/buildroot-2017.11/buildroot/output/build/mpdas-0.4.4'
package/pkg-generic.mk:234: recipe for target '/root/buildroot-2017.11/buildroot/output/build/mpdas-0.4.4/.stamp_built' failed
make: *** [/root/buildroot-2017.11/buildroot/output/build/mpdas-0.4.4/.stamp_built] Error 2

mpdas loses tracks when submitting to last.fm

Actually it was only able to update statuses, but it was unable to send any track info from 8 played tracks.

Debug log as follows:

[emz@bsdrookie:~/mpdas.cores]> /usr/local/bin/mpdas -c /usr/local/etc/mpdasrc 
(17:25:50) [ERROR] You are not root. Not changing user ..
(17:25:50) [INFO] Connected to MPD.
(17:25:50) [INFO] Last.fm handshake successful. SessionID: 0a61dcbebe1bfc28ace809fdcbe5ccfe
(17:25:50) [INFO] New song: Evol - Ancient Abbey (Thunder Remix)
(17:25:51) [INFO] Updated "Now Playing" status successfully.
(17:25:51) [INFO] Scrobbling:  - 
(17:25:51) [ERROR] Last.fm returned an error while scrobbling:
<?xml version="1.0" encoding="utf-8"?>
<lfm status="failed">
<error code="6">
    timestamp is not a valid integer: 34375945446
</error>
</lfm>

(17:25:51) [ERROR] Code: 6
(17:25:51) [ERROR] Error scrobbling. Trying again in 5 minutes.
(17:30:50) [INFO] New song: Evol - Das gemiedene Schloss
(17:30:51) [INFO] Updated "Now Playing" status successfully.
(17:30:51) [INFO] Scrobbling:  - 
(17:30:51) [ERROR] Last.fm returned an error while scrobbling:
<?xml version="1.0" encoding="utf-8"?>
<lfm status="failed">
<error code="6">
    timestamp is not a valid integer: 34375945446
</error>
</lfm>

(17:30:51) [ERROR] Code: 6
(17:30:51) [ERROR] Error scrobbling. Trying again in 5 minutes.
(17:34:50) [INFO] New song: Evol - Phenomena
(17:34:50) [INFO] Updated "Now Playing" status successfully.
(17:35:51) [INFO] Scrobbling:  - 
(17:35:51) [ERROR] Last.fm returned an error while scrobbling:
<?xml version="1.0" encoding="utf-8"?>
<lfm status="failed">
<error code="6">
    timestamp is not a valid integer: 34375945446
</error>
</lfm>

(17:35:51) [ERROR] Code: 6
(17:35:51) [ERROR] Error scrobbling. Trying again in 5 minutes.
(17:35:51) [ERROR] Re-Handshaking!
(17:35:52) [INFO] Last.fm handshake successful. SessionID: 0a61dcbebe1bfc28ace809fdcbe5ccfe
(17:38:54) [INFO] New song: Evol - Prologue (waiting for his coming)
(17:38:55) [INFO] Updated "Now Playing" status successfully.
(17:40:51) [INFO] Scrobbling:  - 
(17:40:51) [ERROR] Last.fm returned an error while scrobbling:
<?xml version="1.0" encoding="utf-8"?>
<lfm status="failed">
<error code="6">
    timestamp is not a valid integer: 34375945446
</error>
</lfm>

(17:40:51) [ERROR] Code: 6
(17:40:51) [ERROR] Error scrobbling. Trying again in 5 minutes.
(17:41:41) [INFO] New song: Evol - The Chant Of The Witch
(17:41:41) [INFO] Updated "Now Playing" status successfully.

libre.fm: Code 6

I have encountered an error after upgrading to version 0.4.3. I am using mpdas to connect to libre.fm and am now getting the following error:

$ mpdas
(11:49:39) [ERROR] You are not root. Not changing user ..
(11:49:39) [INFO] Using Libre.fm service URL
(11:49:39) [INFO] Connected to MPD.
(11:49:41) [ERROR] Code: 6
(11:49:41) [INFO] Closing mpdas.

I get the same error whether I use the MD5 password or have it entered into the config file as plaintext. I was unable to find additional information in the mpdas source on what Code 6 means.

My configuration file is:

username = librefmusername
password = mypassword
runas = myuser
debug = 1
service = librefm

Please let me know if there is additional information I can provide.

Not autostarting with systemd

Hello,

How exactly do you get mpdas to autostart upon system startup?

I've enabled the mpdas service, but it shows this on startup:

$ systemctl --user status mpdas
● mpdas.service - AudoScrobbler client for MPD
   Loaded: loaded (/usr/lib/systemd/user/mpdas.service; enabled; vendor preset: enabled)
   Active: inactive (dead)

And I end up having to start the service.

EDIT: More information.

I use Arch Linux and I'm using the user service instead of a global service.

clang-compiled mpdas is crashing when trying to communicate with last.fm

I'm not sure whether to report or not, so just FYIO

OS: FreeBSD-10.0-STABLE
Compiler:
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
Target: x86_64-unknown-freebsd10.0
Thread model: posix

clang-compiled mpdas is crashing when trying to communicate with last.fm:

[emz@bsdrookie:~/mpdas.cores]> mpdas -c /usr/local/etc/mpdasrc     
(16:31:31) [ERROR] You are not root. Not changing user ..
(16:31:31) [INFO] Connected to MPD.
zsh: illegal hardware instruction (core dumped)  mpdas -c /usr/local/etc/mpdasrc

Backtrace:

[emz@bsdrookie:~/mpdas.cores]> gdb /usr/local/bin/mpdas mpdas.core 
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
Core was generated by `mpdas'.
Program terminated with signal 4, Illegal instruction.
Reading symbols from /usr/local/lib/libmpd.so.4...done.
Loaded symbols for /usr/local/lib/libmpd.so.4
Reading symbols from /usr/local/lib/libglib-2.0.so.0...done.
Loaded symbols for /usr/local/lib/libglib-2.0.so.0
Reading symbols from /usr/local/lib/libintl.so.9...done.
Loaded symbols for /usr/local/lib/libintl.so.9
Reading symbols from /usr/local/lib/libcurl.so.7...done.
Loaded symbols for /usr/local/lib/libcurl.so.7
Reading symbols from /usr/lib/libc++.so.1...done.
Loaded symbols for /usr/lib/libc++.so.1
Reading symbols from /lib/libcxxrt.so.1...done.
Loaded symbols for /lib/libcxxrt.so.1
Reading symbols from /lib/libm.so.5...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/lib/libpcre.so.3...done.
Loaded symbols for /usr/local/lib/libpcre.so.3
Reading symbols from /lib/libthr.so.3...done.
Loaded symbols for /lib/libthr.so.3
Reading symbols from /usr/lib/libssl.so.7...done.
Loaded symbols for /usr/lib/libssl.so.7
Reading symbols from /usr/lib/libgssapi.so.10...done.
Loaded symbols for /usr/lib/libgssapi.so.10
Reading symbols from /usr/lib/libheimntlm.so.11...done.
Loaded symbols for /usr/lib/libheimntlm.so.11
Reading symbols from /usr/lib/libkrb5.so.11...done.
Loaded symbols for /usr/lib/libkrb5.so.11
Reading symbols from /usr/lib/libhx509.so.11...done.
Loaded symbols for /usr/lib/libhx509.so.11
Reading symbols from /usr/lib/libcom_err.so.5...done.
Loaded symbols for /usr/lib/libcom_err.so.5
Reading symbols from /lib/libcrypto.so.7...done.
Loaded symbols for /lib/libcrypto.so.7
Reading symbols from /usr/lib/libasn1.so.11...done.
Loaded symbols for /usr/lib/libasn1.so.11
Reading symbols from /usr/lib/libwind.so.11...done.
Loaded symbols for /usr/lib/libwind.so.11
Reading symbols from /usr/lib/libheimbase.so.11...done.
Loaded symbols for /usr/lib/libheimbase.so.11
Reading symbols from /usr/lib/libroken.so.11...done.
Loaded symbols for /usr/lib/libroken.so.11
Reading symbols from /lib/libcrypt.so.5...done.
Loaded symbols for /lib/libcrypt.so.5
Reading symbols from /lib/libz.so.6...done.
Loaded symbols for /lib/libz.so.6
Reading symbols from /usr/lib/private/libheimipcc.so.11...done.
Loaded symbols for /usr/lib/private/libheimipcc.so.11
Reading symbols from /usr/local/lib/nss_winbind.so.1...done.
Loaded symbols for /usr/local/lib/nss_winbind.so.1
Reading symbols from /usr/local/lib/samba/libwinbind-client.so...done.
Loaded symbols for /usr/local/lib/samba/libwinbind-client.so
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x000000000040e245 in writecb (ptr=0x8048af900, size=1, nmemb=168, stream=0x801e40b10) at audioscrobbler.cpp:14
14              AudioScrobbler->ReportResponse((char*)ptr, size*nmemb);
[New Thread 804806400 (LWP 100472/mpdas)]
(gdb) bt
#0  0x000000000040e245 in writecb (ptr=0x8048af900, size=1, nmemb=168, stream=0x801e40b10) at audioscrobbler.cpp:14
#1  0x0000000800f80503 in curl_formfree () from /usr/local/lib/libcurl.so.7
#2  0x0000000800f99263 in curl_mvfprintf () from /usr/local/lib/libcurl.so.7
#3  0x0000000800fa2650 in curl_multi_perform () from /usr/local/lib/libcurl.so.7
#4  0x0000000800fa1c61 in curl_multi_perform () from /usr/local/lib/libcurl.so.7
#5  0x0000000800f9abbd in curl_easy_perform () from /usr/local/lib/libcurl.so.7
#6  0x000000000040e83d in CAudioScrobbler::OpenURL (this=0x80488d080, url=@0x7fffffffc780, 
    postfields=0x804881780 "method=auth.getMobileSession&username=emz&authToken=b604d547a7b3eb1c33b251ec317a8ab0&api_key=a0ed2629d3d28606f67d7214c916788d&api_sig=b12bf9c0078e8b22ba47de0573ced262", errbuf=0x0) at audioscrobbler.cpp:46
#7  0x0000000000411b18 in CAudioScrobbler::Handshake (this=0x80488d080) at audioscrobbler.cpp:236
#8  0x0000000000404ee0 in main (argc=3, argv=0x7fffffffd470) at main.cpp:123

Authentication Error, Code: 4

I get an authentication error when trying to connect my last.fm account to mpdas.

Here's the output

(19:51:24) [ERROR] You are not root. Not changing user ..
(19:51:24) [INFO] Cannot parse config file (/home/USER/.mpdasrc).
(19:51:24) [INFO] Using Last.fm service URL
(19:51:24) [INFO] Connected to MPD.
(19:51:24) [ERROR] Code: 4
(19:51:24) [ERROR] Authentication failed. Please check your login data.
(19:51:24) [INFO] Closing mpdas.

And my config file

username = USERNAME
password = PASSWORD
runas = mpd
debug = 0

I've just recently changed my password to cut out any unnecessary special characters so I know both fields are valid.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.