INTERACT FORUM

Please login or register.

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

Author Topic: smartlist for tracks in multiple playlists/smartlists  (Read 1463 times)

steven.porteus

  • Recent member
  • *
  • Posts: 34
smartlist for tracks in multiple playlists/smartlists
« on: January 05, 2015, 05:30:39 pm »

I'm struggling with how to do this in the search/expression language.  I fear my scripting and expression skills are now completely rusted out and I've been in middle management far too long. 

I want to have a smartlist to show me any tracks that are in more than one smartlist/playlist which I use for syncing.  I'm sure I accidently assigned at least an album or two to a static playlist that is also picked up in a smartlist.

I was thinking a "simple" smartlist to just show me anything that has more than one playlist/smartlist and I can just sort them to see what is and isn't correct.  However, I can't get that expression to work,  trying to use listcount([Playlists]) , and I don't think that smartlists are "stored" in the database, so they won't show up in the playlists variable (please correct me if I'm wrong). 

Ultimately, I'd like to say, show me anything that is in more than one of these playlists (comprised of both playlists and smartlists).
Logged

JohnT

  • Citizen of the Universe
  • *****
  • Posts: 4627
Re: smartlist for tracks in multiple playlists/smartlists
« Reply #1 on: January 06, 2015, 01:46:50 pm »

Are these playlists used for syncing to an external device (Handheld)?  If so, the syncing process removes duplicates.
Logged
John Thompson, JRiver Media Center

steven.porteus

  • Recent member
  • *
  • Posts: 34
Re: smartlist for tracks in multiple playlists/smartlists
« Reply #2 on: March 04, 2015, 07:12:23 pm »

Yes, the playlists are used for syncing devices.  The way I'm using these playlists, I shouldn't have anything in more than one playlist.  Since they are different devices being synced, the synchronizing might not eliminate duplicates and I might be accidently putting tracks/albums into the wrong list(s).

So, I see that playlists are part of the metadata, but I don't know how to create a field to count the number of playlists a track is assigned to so I can filter on that field.

Logged

steven.porteus

  • Recent member
  • *
  • Posts: 34
Re: smartlist for tracks in multiple playlists/smartlists
« Reply #3 on: March 05, 2015, 06:48:43 am »

I was playing with this last night, but I think I'm either doing something wrong with the expression or I can't access the Playlists field in the expression.  I was trying variations of this expression in the smartlist filter but getting no results.

[listcount([Playlists])]=>2

Am I close?  I know you can list the playlists that a track is a part of in a view, I just need to be able to count the entries in that list and filter by the number of entries in that list.  Is that "field" accessible in the expression language?
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8009
Re: smartlist for tracks in multiple playlists/smartlists
« Reply #4 on: March 05, 2015, 09:01:43 am »

How many playlists do you have that you want to check?  If you only have a handful you can do it with a command line tool that's designed exactly for this job:  Namely to show you the common lines shared between two files.

Outline of the process:

1.  Export playlists as simple text files, as M3U8s named appropriately.
2.  Sort each file.  Command:  sort playlist1 > playlist1.s
2a.  repeat for each file
3.  Find common lines.  Command:  comm -12 playlist1.s playlist2.s

That will yield a list of file names that are the same between playlist1 and playlist2.

3a. Repeat for every pair of playlists. This could get big if you have more than maybe 3 or 4 lists you want to check.

Not sure if that will be easy enough but it would seem to solve your problem.

Brian.
Logged

steven.porteus

  • Recent member
  • *
  • Posts: 34
Re: smartlist for tracks in multiple playlists/smartlists
« Reply #5 on: April 09, 2015, 06:14:31 am »

So, from what I'm gathering, the "Playlists" value that can be displayed in a list cannot be accessed via an expression.  Is this true?  It doesn't come up as a field name nor does it appear as a variable name if I put a new expression column in a view.  I want to be sure I'm not missing someway to access that value list in an expression.
Logged
Pages: [1]   Go Up