Moode Forum
Random track play not working - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7)
+--- Thread: Random track play not working (/showthread.php?tid=4430)



Random track play not working - SoundMan57 - 11-01-2021

I am confused on how to get the player to play random tracks, it seems everything I try fails to work for me. I can get random tracks to play within a album play list but once the tracks are all consumed, the player does not add 2 more tracks to the play list and stops playing. I saw one post that said to turn on the ashuffle and the cmd line and I am getting an error but do not know if that is my problem or not. (see below)


pi@MoodePI:~ $ ashuffle
libmpdclient received a malformed response from the server.
This may be because a song's metadata attribute (for example,
a comment) was longer than 4KiB.
See https://github.com/joshkunz/ashuffle/issues/89 for
details or updates.
MPD error: Response line too large

I ran this command but this does not seem large enough to cause this issue:
pi@MoodePI:~ $ mpc list comment | awk '{print length, $0}'|sort -nr|head -1

256 Interprètes : Michael Giacchino, Associated Performer, Composer, Main Artist, Orchestrator, Associated Performer, Composer, Orchestrator; David Coker, Composer; Tim Simonec, Conductor, Orchestrator; American Federation of Musicians, Associated Performe...
pi@MoodePI:~ $

Release Information Platform Information
  • RaspiOS: 10.6
  • Linux kernel: 5.4.77-v8+ #1371
  • Platform: Pi-3B+ 1.3 1GB
  • Architecture: aarch64
  • MPD version: 0.22.11_p0x3

Any ideas?
Thank you.


RE: Random track play not working - TheOldPresbyope - 11-01-2021

@SoundMan57

Probably a good idea to read the github issue referenced in the error message. 

I don't grok C++ so I'm not going to try to codewalk through ashuffle's sources but exceeding the 4Kb limit mentioned seems to relate to more than just any single "comment" line. Unfortunately, the bug appears to be attributed to the libmpdclient library from the mpd distro rather than in ashuffle itself.

It appears that the ashuffle maintainer pushed a new version with a partial workaround to this issue just 22 days ago. See tag v3.12.3.

You might try downloading the ashuffle.armv6h-linux-gnueabihf  binary and using it in place of the /usr/local/bin/ashuffle binary currently in moOde 7.4.1 to see if the fix has made a difference. (Actually, you can try testing directly from the command line.)

Notes:
  • the github page says this new binary is release 3.12.3 but ashuffle -v still declares 3.11.1, same as does the binary currently in moOde 7.4.1. Nevertheless they have different buildID hashes.
  • all the binaries on the github page (and in moOde) are armv6 according to readelf, no matter what the github filenames may say.
  • the fix included adding a new invocation option which my simple proposal doesn't address. It would have to be added to playerlib.php (and possibly dealt with in other places; I don't know).
Regards,
Kent


RE: Random track play not working - TheOldPresbyope - 11-01-2021

@SoundMan57

PS - be sure to revert to the 32-bit armv7l kernel to make sure the aarch64 kernel isn't causing problems. The latter is still considered only an experimental option in moOde because of various problems which have cropped up.

Regards,
Kent


RE: Random track play not working - SoundMan57 - 11-03-2021

Thank you for the info. I am a Windows guy and figured out just enough to get Moode up and running on the PI but know nothing about replacing binaries. If you can point me to a quick tutorial on updating binaries I would really appreciate it.
Thank you


RE: Random track play not working - TheOldPresbyope - 11-03-2021

Let's take it slow then.

In user pi's home directory

Code:
# get the new binary
wget https://github.com/joshkunz/ashuffle/releases/download/v3.12.3/ashuffle.armv6h-linux-gnueabihf -O ashuffle.3123

#mark it as executable
chmod +x ashuffle.3123

# invoke it
./ashuffle.3123
where the wget command is one line but in my browser it's displayed as two.

If you get the same 'malformed response' message when you invoke the new ashuffle, then we're done here.

If the new ashuffle runs successfully, however, then you can try the following.

Code:
# move the new binary to the appropriate system directory
sudo mv ashuffle.3123 /usr/local/bin/ashuffle.3123

# change to the directory to make life easier
cd /usr/local/bin

# rename the existing binary
sudo mv ashuffle ashuffle.dist

# create a symlink to the new binary
sudo ln -s ashuffle.3123 ashuffle

# change back to the home directory
cd

We're using 'sudo' for many of these commands because you're working in a system directory. 

In this example, I went an extra step, renaming the old binary and creating a symlink "ashuffle" so the new binary would be invoked instead. If for some reason you want to revert to the old binary, just repeat the symlink creation step but pointing to ashuffle.dist instead of ashuffle.3123

I'll be interested to hear if the new binary makes any difference. Again, we haven't done anything here that might be needed to deal with the new command option. Gotta leave some work for the next guy Tongue

Regards,
Ken


RE: Random track play not working - SoundMan57 - 11-05-2021

Thank you for the steps, unfortunately same error as before.

Thank you.