automatic playlist editor cannot edit general boolean combinations
Submitted by Colin Macdonald
Link to original bug (#352637)
Description
Motivation: I wanted to make an automatic playlist with: (genre==metal || genre==rock) && (rating >= 3)
I couldn't do this with the automatic playlist dialog because it can only do either A&&B&&..&&Z or A||B||..||Z but not more general combinations of boolean operators.
I looked in the playlist.xml file and tried modifying it directly:
<conjunction>
<equals prop="type">
song</equals>
<subquery>
<conjunction>
<like prop="genre-folded">
hip</like>
<like prop="genre-folded">
rap</like>
</conjunction>
</subquery>
<subquery>
<conjunction>
<greater prop="rating">
3.000000</greater>
</conjunction>
</subquery>
</conjunction>
</playlist>
In this case, it is supposed to match hip-hop or rap, rated >=3. And it works!
Back in rhythmbox, if I try to edit the automatic playlist I get the following warning:
(rhythmbox:15105): Rhythmbox-CRITICAL **: rb_query_creator_load_query: assertion query->len == 2' failed sys:1: Warning: invalid (NULL) pointer instance sys:1: Warning: g_signal_connect_data: assertion
G_TYPE_CHECK_INSTANCE (instance)' failed
sys:1: GtkWarning: gtk_window_present_with_time: assertion GTK_IS_WINDOW (window)' failed sys:1: GtkWarning: widget
GtkTable' isn't suitable for mnemonic activation
Very cool! (I figured it would just crash.)
I suppose a GUI that could handle very general cases might be too complicated. However, it seems to me that users might commonly want to be able to create the sort of playlist that I wanted.
My only suggestion would be to allow the user to edit the xml structure directly through an "advanced" button.
At the very least, if a user does manually edit the xml file, there should be a popup dialog that says "this playlist cannot be edited within Rhythmbox" or something like that when the query->len == 2 assertion fails.
Version: 0.9.5