Bug 145925 - Labels and Smart Playlists have unexpected behavior
Summary: Labels and Smart Playlists have unexpected behavior
Status: RESOLVED DUPLICATE of bug 140542
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.4-SVN
Platform: Ubuntu Linux
: LO normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-25 01:52 UTC by Sam Calhoun
Modified: 2007-09-03 13:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Calhoun 2007-05-25 01:52:06 UTC
Version:            (using KDE KDE 3.5.6)
Installed from:    Ubuntu Packages
OS:                Linux

This bug is for Amarok 1.4.5 running with KDE 3.5.6 in Ubnutu.

The bug:
The function of smart play-lists when using "Label" as the field works in ways that are different from both my own expectation and the behavior of smart play-lists with conditions on other fields (besides "Label").

It seems like Amarok looks at a list of all known labels, compares each label to the condition, and if it passes adds all songs labeled with this label to a smart play-list.  This has the following unexpected side effects:
- Songs with multiple labels can show up on a play-list multiple times.
- Songs with multiple labels can show up on play-lists where one of their labels fails "Not" condition.
- Songs with no label cannot be on smart play-lists with "Matches All" + any Label-based condition (including things like Label + "Is not")

Four examples of this bug can be reproduced as follows:

Example 1:

- Label a song with two labels (For this example, "Label 1" and "Label 2")
- Create a Smart Play-list with the condition: "Matches any: Label + Does not contain: 'Label 1'"
- The song will show up on the play-list.  The play list will also contain all other songs with labels that do not match "Label 1" (once for each label they have that passes the condition).

Expected behavior was a playlist containing all songs in the collection except those that have a label matching "Label 1."  This differs from the actual results in the following ways:
 - Only songs with labels show up
 - Songs with multiple labels show up multiple times.
 - Songs with multiple labels and some of their labels contain "Label 1" show up on the list at all.

Example 2:

- Using the same song above (with labels "Label 1" and "Label 2")
- Create a Smart Play-list with a condition "Matches any: Label + Does not contain: 'Label 3'"
- The song will appear twice on the play-list.  The playlist will contain all other songs with labels (once for each label they have that passes the condition).

This example is the same as example one, except it explicitly demonstrates that a song with multiple labels will show up twice if a "Label + Not" condition is used and the collection contains a song with two labels that pass this condition.


Example 3:

- Label three songs as follows:
- Song 1 - "Label 1"
- Song 2 - "Label 2"
- Song 3 - "Label 1, Label 2"
- Create a smart play-list with conditions: "Matches any: Label + Contains: 'Label 1', Label + Contains: 'Label 2'"
- The third song will show up twice on the playlist.

Expected behavior here is for each song that passes condition one or condition two to show up once.  Songs that path both conditions should only show up once.  However, songs that pass both conditions actually show up two times.

Example 4:
- Create a smart play-list with conditions: "Matches all: Label + Is not 'Label 1', Artist + Is [Some Artist]"
- The smart play-list will only contain the following set of songs:
 - List of all songs with labels, once for each label
 - Remove all songs that have a label matching "Label 1" once for each matching label
 - Remove all songs not by the specified artist.

The expected behavior here is that all songs by the specified artist which do not have a label matching the first condition.  The actual list is only those containing a label which is not label 1.  (Like in example 1, if a song has two labels and one of these is not "Label 1", it will show up on the play-list).
Comment 1 Pedro Morales 2007-06-03 13:29:07 UTC
I can confirm at least the first example given for this bug.

I'm using amarok 1.4.5 on kde 3.5.6 on gentoo.
Comment 2 tom pijls 2007-06-12 08:40:09 UTC
Same here, "does not contain" or "is not" label both contain above behaviour

ubuntu 7.04, amarok 1.4.5, mysql

 
Comment 3 songohan2 2007-07-13 20:09:01 UTC
same here: i have a label "noautoplay" which is useless on songs with more than one label.

also the generated sql query does not look very nice..

kubuntu 7.04, amarok 1.4.5, mysql  and also 
kubuntu 7.04, amarok 1.4.6, mysql
Comment 4 Chris Gadd 2007-08-17 01:31:16 UTC
Another example which gives unexpected behaviour:
- Label a song with two labels (For this example, "Label 1" and "Label 2")
- Create a Smart Play-list with the condition: "Matches all: Label + Contains: 'Label 1',  Label + Contains: 'Label 2'"
- The song will not show up on the play-list (playlist will be empty).

kubuntu 7.04, amarok 1.4.6, SQLite
Comment 5 Maximilian Kossick 2007-09-03 13:23:10 UTC

*** This bug has been marked as a duplicate of 140542 ***