INTERACT FORUM

Please login or register.

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

Author Topic: sorting question  (Read 3721 times)

stiv32

  • World Citizen
  • ***
  • Posts: 162
sorting question
« on: March 20, 2014, 03:11:39 pm »

Hello,

is there a way in a playlist or smartlist to sort the songs

1. by those with the longest Name.

or

2. by those which have a 'date string'. at any field?

Thanks in advance
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: sorting question
« Reply #1 on: March 20, 2014, 03:15:37 pm »

1. Add a new column by right-clicking the headers.  Select Add Expression Column... and enter:

   length([Name])

and OK your way out.  Now you have a column that indicates the length of the Name field, and you can sort on that.  The length() function indicates how long (in characters) a value is.

2. You're wanting to look across all MC fields for something that looks like a date?  Maybe you can give more details here and on what you're trying to accomplish.
Logged
The opinions I express represent my own folly.

stiv32

  • World Citizen
  • ***
  • Posts: 162
Re: sorting question
« Reply #2 on: March 21, 2014, 12:06:56 am »

Thank you very much Mr C,

I am trying to de-duplicate my tango songs. These have the specificity that one can't find enough information at the online databases. A very valuable field of these music tracks is date. It can be found at the Name field or at the Filename field or at one of the Date fields.


So, trying to preserve it when I de-duplicate I could sort the songs by this parameter and keep those with a date string in any of the fields.

Thanks again for helping me!
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: sorting question
« Reply #3 on: March 21, 2014, 12:37:45 am »

I'd need to see some example field values for sever files to figure out how to do this.
Logged
The opinions I express represent my own folly.

stiv32

  • World Citizen
  • ***
  • Posts: 162
Re: sorting question
« Reply #4 on: March 21, 2014, 02:42:14 am »

About the length of Name. I tried to implement it here but with no success


[Media Type]=[Audio] [Rating]=0-3 ~dup=[Duration],[Dynamic Range /(DR/)],[Dynamic Range /(R128/)],[File Size],[Peak Level /(R128/)],[Volume Level /(R128/)] ~sort=[Name],[Rating],[Volume Level (R128)],[Bitrate],[Media Type],[Album Artist (auto)],[Album],[Disc #]~nodup=length([Name])


am I doing something wrong?


About the Date string, how can I send you a sample?
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: sorting question
« Reply #5 on: March 21, 2014, 02:58:51 am »

That won't work.  ~dup and ~nodup only work against fields, so you'll have to create your own custom user field of type Expression, and set the length([name]) there.  Then you can use that with ~nodup.

For the files, select maybe a dozen different ones, representative of your dates, and and use File > Export Playlist.  Select:

   Format: Text File (CSV delimited)
   Included Fields: All Fields
   Output Range: Selection

Save it to the Desktop, zip it, and attach it in a reply here.

I'm just want to look through those fields where you say there are dates.  In order to attempt to grab the dates, they have to consistently follow some pattern.
Logged
The opinions I express represent my own folly.

stiv32

  • World Citizen
  • ***
  • Posts: 162
Re: sorting question
« Reply #6 on: March 21, 2014, 03:17:14 am »

OK, I just attached it. (I couldn't attach the csv file so I renamed it to .txt.)

I am sorry but I don´t know how to make the custom user field of type Expression. Could you help me out at this? I have found this page
http://wiki.jriver.com/index.php/Expression_Language
will I find a way to do it there?

Thank you
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: sorting question
« Reply #7 on: March 21, 2014, 03:27:11 am »

Tools > Options > Library & Folders > Manage Library Fields.

Add a new field, name it, and set the type the Calculated Data.  Paste the expression there.
Logged
The opinions I express represent my own folly.

stiv32

  • World Citizen
  • ***
  • Posts: 162
Re: sorting question
« Reply #8 on: March 21, 2014, 04:04:03 am »

Wow!!! ;D
Thank you! 

Really Helpful for other things as well!  8)
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: sorting question
« Reply #9 on: March 23, 2014, 03:59:24 pm »

I've split this topic regarding the parsing dates from fields into the new thread:

   http://yabb.jriver.com/interact/index.php?topic=88279.0

I'll lock this thread since the original question is answered.
   
Logged
The opinions I express represent my own folly.
Pages: [1]   Go Up