Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: Auto-shuffle not working for me
#1
Hi. I'm a new user and I'm very impressed with moOde. It worked straight out of the box using the download image. Thanks.

Can you please help me to get Auto-Shuffle working. My situation is a bit like this post which I found very helpful. I'm using Raspberry Pi 1B with moOde 7.0.1. Audio out is from the headphone jack. Music files are on a NAS connected by Samba. Everything seems to be working normally apart from Auto-shuffle. When MPD gets to the end of the queue it just stops.

In Audio Config I have set Auto-shuffle on and rebooted the Pi several times to make sure.

When I connect with SSH and run
Code:
pgrep -l ashuffle

the program is not running. However, I can run ashuffle manually from the command line and it says
Code:
Picking random songs out of a pool of 4794


(which is the correct number). It then does what I want, adding one new song each time the player gets to the end of the queue. I can't find any relevant error messages.

Once ashuffle is running it seems quite stable. Which suggests that the problem is that ashuffle does not start correctly, rather than it's crashing.

Can you please suggest what I could try next.

Bob
Reply
#2
Given that it's a 1B I'm guessing its some sort of physical resource for example RAM or CPU thats being exhausted.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
Hi @Tim Curtis. Thanks for the quick reply.

My situation is a bit different from the other post I referenced. I don't see any evidence of ashuffle having crashed. It runs OK when I start it from the command line. It's more like it never started in the first place.

Is there a way I can check in the logs whether it started correctly and how long it ran for?
Reply
#4
What do you mean by "started correctly"? It either starts and runs or it crashes. you can verify its running by the command below. If its running the command will print something like "3268 ashuffle" which is the PID and name of the running process.

Code:
pgrep -l ashuffle

There is no other logging from ashuffle that I'm aware of.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
Yes. I can see from pgrep that ashuffle is definitely not running. I have been doing a lot of digging around without fully understanding any of it. Could I please check if I've got this right.

(1) Auto-shuffle keeps the queue topped up by adding 1 or 2 random songs when necessary.

(2) moOde implements this using a third party program ashuffle.

(3) If the user turns on Auto-shuffle, moOde launches ashuffle in a separate thread. If the user turns off Auto-shuffle, then moOde kills ashuffle.

(4) In either case there will be an entry in /var/log/moode.log like "worker: Starting auto-shuffle".

If the above is correct, it leads on to a couple of questions.

To use Auto-shuffle, it's obvious you need to set it to ON in the Audio Config. But do you also need to do something with the Random button (Asterisk) near the play controls? And if so, what? Is it a momentary button or should it latch and change to green like some of the others?

On my system Auto-shuffle is definitely ON in the Audio config. The Asterisk button is grey. When I click it it spins and adds some items to the queue. But it doesn't change colour and it doesn't stay latched. Is that right? In /var/log/moode.log I would expect to see some messages about auto-shuffle, but there are none. This makes me wonder if it ever actually started.

Could any of this indicate where I am going wrong?
Reply
#6
I can now answer my own question. To get the Auto-shuffle to work requires TWO independent actions. First you have to enable the feature in Audio Config. Then you have to turn it on in the user interface. To do this, click the random button near the play controls. It's the one with two crossed arrows. It then works as expected.

Sorry for being a bit dim. I was gradually getting there. I had worked out that some additional action was required in the user interface. But I picked the wrong button to do it. I was trying to use the asterisk button instead of the arrows.

I still don't know what the asterisk is for. It does something similar - maybe someone can explain.
Reply
#7
(01-13-2021, 08:56 AM)Tenbob Wrote: I can now answer my own question. To get the Auto-shuffle to work requires TWO independent actions. First you have to enable the feature in Audio Config. Then you have to turn it on in the user interface. To do this, click the random button near the play controls. It's the one with two crossed arrows. It then works as expected.

Sorry for being a bit dim. I was gradually getting there. I had worked out that some additional action was required in the user interface. But I picked the wrong button to do it. I was trying to use the asterisk button instead of the arrows.

I still don't know what the asterisk is for. It does something similar - maybe someone can explain.

There are three different things here.
  1. Autoshuffle in the Audio config.  This will automatically add two new random songs to the end of your playlist so that the music never stops.
  2. The Shuffle button on the playback UI.  This simply shuffles the tracks currently in the playlist.  Once they have all played playback will stop (assuming repeat isn't also selected).  Autoshuffle can also be engaged in combination with this if you like.
  3. Random play.  This is the asterisk which will select a random track from your library then perform the "One Touch Action" on it.
----------------
Robert
Reply
#8
(01-13-2021, 08:56 AM)Tenbob Wrote: I can now answer my own question. To get the Auto-shuffle to work requires TWO independent actions. First you have to enable the feature in Audio Config. Then you have to turn it on in the user interface. To do this, click the random button near the play controls. It's the one with two crossed arrows. It then works as expected.

Sorry for being a bit dim. I was gradually getting there. I had worked out that some additional action was required in the user interface. But I picked the wrong button to do it. I was trying to use the asterisk button instead of the arrows.

I still don't know what the asterisk is for. It does something similar - maybe someone can explain.

Menu, Quick help
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#9
I'm happy to say it's all working now. I even added a filter on the filename so it is adding songs from my preferred directory. Thanks for your help.
Reply


Forum Jump: