INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Odd limit behavior in smart list  (Read 4850 times)

texaganian

  • Regular Member
  • Recent member
  • *
  • Posts: 48
  • Change this by choosing profile
Odd limit behavior in smart list
« on: May 04, 2008, 01:42:02 pm »

OK, bear with me, this will take a bit to explain.

I wanted to create a SmartList which would return all songs that I have cover versions from more than one artist. The list should return only one version of the song from each artist.

Didn't seem too hard and my original try at it seemed to work. The smartlist definition looked like this:

    ([Media Type]=[Audio] ~dup=[Name] ~sort=[Name],[Artist]) ~limit=-1,1,[Artist]

This appeared to work but it also showed songs where I have multiple versions but only by one artist. So I added a second Dup clause to filter those out, like this:

    (([Media Type]=[Audio] ~dup=[Name] ~sort=[Name],[Artist]) ~dup=[Name])) ~limit=-1,1,[Artist]

Again it appeared to work until I looked at the results closely. For some (but, curiously, not all) songs it doesn't return everything.

Take, for instance, "Amazing Grace". If I search "Audio" for name="Amazing Grace", I get 15 tracks from 13 artists.

But when I use the SmartList definition above it only returns seven of those tracks. If I remove the "~limit=-1,1,[Artist]" clause it returns all the tracks but doesn't do what I want.

Now here's the REALLY weird part. If I restore the "~limit=-1,1,[Artist]" clause and ADD a [name]="Amazing Grace" clause at the front, like so:

    ([name]="Amazing Grace" [Media Type]=[Audio] ~dup=[Name] ~sort=[Name],[Artist]) ~dup=[Name]) ~limit=-1,1,[Artist]

it returns exactly what it should, 13 tracks from 13 different artists (but obviously is no longer a general purpose solution)!

Anybody have any idea what is going on here?
Logged
Pages: [1]   Go Up