INTERACT FORUM

More => Old Versions => JRiver Media Center 21 for Windows => Topic started by: yannis on June 01, 2016, 10:33:46 am

Title: help with variable year
Post by: yannis on June 01, 2016, 10:33:46 am
Hi, I've upgraded after a long while and I need help with an expression, smartlist or view to locate albums with multiple values in the year field. Also, can someone explain the difference between Date and Year as used in MC?

Thanks in advance.
Title: Re: help with variable year
Post by: mwillems on June 01, 2016, 10:44:29 am
I can't help with the expression, but the difference between [Date] and [Year] is that [Date] can include the full month-day-year date, while [Year] can only include the year.  [Date] is much more relevant for things like TV episodes or Personal Pictures than for Music, IME, but my recollection is that MC will automatically derive [Year] from a full [Date] if you have it (so you don't have to enter it twice).
Title: Re: help with variable year
Post by: blgentry on June 01, 2016, 02:24:57 pm
This isn't a super elegant solution, but it does work:

Make a new view, call it something descriptive.
Customize the view and set it to Categories.
See the attached screen shot for how to define it.  The first category is an expression as shown.  The second category is simply the [Year] field.
Once it's displayed, it will be thumbnails.  Change the list style to Details.
Now you'll see something like my screen shot.  Make sure you can see the Date field as I have shown.  Notice that some of the Date fields have the word "avg" at the end, indicating an average.  This is because the date is different across files in the album.

So just scroll through the list looking for "avg" in the date field.  When you find one, you have an album with multiple Date entries.  As I said, not elegant, but it works.  If you have thousands of albums, this may be a bit tedious, but probably not too bad.

Brian.
Title: Re: help with variable year
Post by: yannis on June 02, 2016, 01:10:12 am
You saved the day, thank you. I knew I should use "avg", but I couldn't figure out how.

Now, if there were a way to exclude the rest of the files or sort the view to group the ones averaged, it'd be perfect; if not, this one'll do.
Title: Re: help with variable year
Post by: RoderickGI on June 02, 2016, 04:55:49 am
Now, if there were a way to exclude the rest of the files or sort the view to group the ones averaged, it'd be perfect; if not, this one'll do.

Challenge accepted.

Add a new temporary Expression Column in the new Album view you have created. I called my test one "IsAvg".

Use the following expression for the column: right([Year], 3)

Sort the new column in Descending order (click the column twice). You should get rows at the top with just the contents of "avg" listed in the column. All those rows should have averaged year values in the standard [Year] tag. All other rows will numeric, including zeros, or blank.


I tried some fancier expressions to eliminate the non-averaged Albums, but figured why make it complex for a one off maintenance task? The above will do the job.

I also just tried using a search expression, to show just Albums with the suffix "avg" in the [Year] tag, but couldn't get that to work at all. Probably because it is a calculated value on the fly, but I expected a search using the expression language to work. No matter.
Title: Re: help with variable year
Post by: blgentry on June 02, 2016, 06:44:00 am
I tried the search too and it didn't work.  I can't believe an expression column works, but a search doesn't!  I'm not sure I understand why.  But it's a nice result.

Note that you really want to use the [Date] field here instead of [Year] because if the difference in dates is very small, the [Year] column won't show "avg" at all.  It will just show a year.  So your expression column should use:

right([Date],3)

Nice addition Roderick!

Brian.
Title: Re: help with variable year
Post by: yannis on June 02, 2016, 07:57:11 am
Thank you both, consider it solved; it worked like a charm :)