Always consume in Iris

Good day,
I’m running mopidy on a RPi Zero and am using Iris for GUI.
Is there a way to turn the consume function (remove played song from playlist) always on?
I have to set it manually every time I restart the Pi.

Does the restore_state config option (Configuration — Mopidy 3.1.1 documentation) do what you want?

Unfortunately not.
The consume is off after a reboot.
I checked effective config restore state is true in that

same here. I expect our best bet is filing an issue on IRIS’ github.

happy to do it if need be. I have another minor issue I have to file this morning.

I just tested this and this works for me as expected. When Mopidy is running, I enable consume mode. When Mopidy stops as part of a normal clean shutdown, if core/restore_state is enabled then all the playback state (including consume mode) is stored in a state file. Next time Mopidy starts it reads the state file and restores everything (including consume mode).

Can you look in your Mopidy log at both shutdown and startup to see if there’s any error message that might explain why this is not working like it should? I don’t think this is something Iris needs to get involved with. It would help if you could confirm you are running Mopidy as a service and share the output of sudo mopidyctl config.

EDIT: You should see something like this in your log when Mopidy stops:

Mar 20 22:55:33 xps systemd[1]: Stopping Mopidy music server...
Mar 20 22:55:33 xps mopidy[156937]: INFO     [MainThread] mopidy.commands Stopping Mopidy core
Mar 20 22:55:33 xps mopidy[156937]: INFO     [Core-10] mopidy.core.actor Saving state to /var/lib/mopidy/core/state.json.gz
Mar 20 22:55:33 xps mopidy[156937]: INFO     [MainThread] mopidy.commands Stopping Mopidy backends
Mar 20 22:55:33 xps mopidy[156937]: INFO     [MainThread] mopidy.commands Stopping Mopidy audio
Mar 20 22:55:33 xps mopidy[156937]: INFO     [MainThread] mopidy.commands Stopping Mopidy mixer
Mar 20 22:55:34 xps systemd[1]: mopidy.service: Succeeded.
Mar 20 22:55:34 xps systemd[1]: Stopped Mopidy music server.

And then when it starts back up again:

Mar 20 22:55:49 xps mopidy[157028]: INFO     [MainThread] mopidy.commands Starting Mopidy core
Mar 20 22:55:49 xps mopidy[157028]: INFO     [Core-10] mopidy.core.actor Loading state from /var/lib/mopidy/core/state.json.gz
Mar 20 22:55:49 xps mopidy[157028]: INFO     [MainThread] mopidy.commands Starting Mopidy frontends: HttpFrontend, MprisFrontend
Mar 20 22:55:49 xps mopidy[157028]: INFO     [HttpFrontend-12] mopidy.http.actor HTTP server running at [::]:6680
Mar 20 22:55:49 xps mopidy[157028]: INFO     [MainThread] mopidy.commands Starting GLib mainloop

You should be able to even go and examine the contents of that state file and see consume mode is preserved.

1 Like

thanks, Nick! Wasn’t aware of that option, glad I hadn’t filed an issue for it yet. :slight_smile:

I’ll give it a try.

adding: seems to work!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.