Author Topic: How to compare two playlists (without order just contained songs) ?  (Read 693 times)

clsven

  • Jr. Member
  • **
  • Posts: 58
Assume I have two playlists already setup in MB.

Now I wan to compare them.
The order of the songs should NOT matter.

I just want to find out which songs are different between them.

How can I achieve this?

tjinc

  • Sr. Member
  • ****
  • Posts: 845
Try using an auto-play list configured as:

Match ANY:
<Playlist> IS Playlist X AND <Playlist> IS NOT Playlist Y
<Playlist> IS Playlist Y AND <Playlist> IS NOT Playlist X

Edit: This might not be exactly what you are looking for but it will give you a list of tracks that are in one playlist and not the other.
Also try setting <Playlist> as a displayed field.
Last Edit: October 26, 2024, 10:04:42 PM by tjinc

clsven

  • Jr. Member
  • **
  • Posts: 58

tjinc

  • Sr. Member
  • ****
  • Posts: 845
That depends on precisely what information you want to be displayed.

My suggestion will produce a list of all tracks that are in either Playlist X or in Playlist Y but not in both. The playlist configuration should look like this:

Two rules:
   1. Will produce a list of tracks that are in Playlist X, but not in Playlist Y
   2. Will produce a list of tracks that are in Playlist Y, but not in Playlist X
The 'match any' setting essentially results in a list of tracks that adhere to either rule 1 OR rule 2.


I believe you are thinking about it like this:

Match ALL:
<Playlist> IS Playlist X
<Playlist> IS NOT Playlist Y

which will only produce a list of tracks that are in Playlist X but not in Playlist Y
Last Edit: October 28, 2024, 07:46:53 PM by tjinc

clsven

  • Jr. Member
  • **
  • Posts: 58
Interesting.

How do you get "and" leftmost in the second row (of your first solution)?

When I open the leftmost drop down there is no "and"

tjinc

  • Sr. Member
  • ****
  • Posts: 845
Press the [.] at the right of the rule to access the window for setting the 'and conditions'.


Another idea: If you are interested in a slightly better result and you are happy to use a virtual tag, you could try this:

Virtual1:
Code
$If($Contains(<Playlist>,"Playlist X"),X,)$If($Contains(<Playlist>,"Playlist Y"),Y,)
This will produce a field with values as follows:
  • X      (for tracks in Playlist X only)
  • XY    (for tracks in Playlist X and Playlist Y)
  • Y      (for tracks in Playlist Y only)

Then use a playlist with a single rule:
<Playlist> IS ANY OF Playlist X; Playlist Y

Set Virtual1 as a displayed field and sort by this field to give you something like this:

(An easy way to compare the two playlists I think)

clsven

  • Jr. Member
  • **
  • Posts: 58
Ok, your GUI-based solution works  :)
Thank you

Regarding the virtual tag method:

As I understand users have at first to add an additional column "virtual1" to the playlist view.
Ok, done
And now?
How do I assign your  matching condition from above to this new column?

tjinc

  • Sr. Member
  • ****
  • Posts: 845
Virtual tags are configured in: Edit > Edit Preferences > Tags (1) - Define New Tags (button). Have a look at these:
Wiki: Virtual Tags
Virtual Tag Functions