Flaky "toogle shuffle mode" button state
Steps to reproduce
Launch quodlibet with LANG=ru or LANG=de Initially I've observed this issue with "ru" locale and "playcounteq" extension. Than I figured out that is the same for any extension. Later somehow it start reproducing on "en" locale too.
Enable some "Play order" plugins
Select plugin in the list for "toogle shuffle mode" button and activate button (toggle on)
Close application
Open application - plugin is still selected in the list but the button is not active (not toggled on)
Expected Output
"toogle shuffle mode" button should save state before app is closing and restore it on the next start
Test System
Which version of Quod Libet?
4.7 development and 4.6.0 Behavior could be different between these 2 versions. I've launched app multiple times and tried to clean ~/.config/quodlibet/* And sometimes I was able to make it work as it should be for 4.6.0 and en locale.
I have another setup on Debian and it looks like it worked there there, but I do not have access to this PC right now so I can not tell you exact version.
Which operating system
Manjaro Linux with KDE desktop
Debug Information
I've tracked with behaviour to
quodlibet/plugins/init.py
if not status:
print_d("Disable %r" % plugin.id)
for handler in plugin.handlers:
handler.plugin_disable(plugin)
quodlibet/qltk/playorder.py
def plugin_disable(self, plugin):
self.remove(plugin.cls)
BTW Try add print_d here
def __shuffle_toggled(self, widget):
if self.__inhibit:
return
print_d("SET ENABLED {}".format(widget.enabled))
config.set("memory", "shuffle", widget.enabled)
self.__compose_order()
So now while app is closing I see next logs
D: [0000.000] main.before_quit: Saving active browser state
D: [0000.000] main.before_quit: Shutting down player device 'GStreamer: 1.22.10.0'.
D: [0000.000] player.gstbe.player.__destroy_pipeline: Destroying Gstreamer pipeline
D: [0000.000] PluginManager.save: Saving plugins: 2 active
D: [0000.000] PluginManager.enable: Disable 'playcounteq'
D: [0000.000] qltk.playorder.__shuffle_toggled: SET ENABLED False
D: [0000.000] qltk.playorder.__compose_order: Updating PlaylistModel order to <Repeat this track ∘ In Order>
D: [0000.000] PluginManager.enable: Disable 'Shuffle by Grouping'
D: [0000.000] qltk.playorder.__shuffle_toggled: SET ENABLED False
D: [0000.000] qltk.playorder.__compose_order: Updating PlaylistModel order to <Repeat this track ∘ In Order>
So it looks like when app is closing plugins are disabled and widget button is toggled to off. Then this new toggle state is saved to config.set("memory", "shuffle", widget.enabled) thus while application is launched again widget button will not be enabled.
Also this is what I see in my configuration.
And I can see another issue here. shuffle_mode saves plugin localized name in the configuration but it should save plugin ID instead.
seek = 0
shuffle = False
shuffle_mode = Уравнитель прослушиваний
sidebar_pos = 0.25
sortby = 0~#track
Guess this issue is the same as #4184
Closing as duplicate of #4184 then