INTERACT FORUM

Please login or register.

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

Author Topic: help with variable year  (Read 2789 times)

yannis

  • World Citizen
  • ***
  • Posts: 229
help with variable year
« 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.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5180
  • "Linux Merit Badge" Recipient
Re: help with variable year
« Reply #1 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).
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8009
Re: help with variable year
« Reply #2 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.
Logged

yannis

  • World Citizen
  • ***
  • Posts: 229
Re: help with variable year
« Reply #3 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.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: help with variable year
« Reply #4 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.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8009
Re: help with variable year
« Reply #5 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.
Logged

yannis

  • World Citizen
  • ***
  • Posts: 229
Re: help with variable year
« Reply #6 on: June 02, 2016, 07:57:11 am »

Thank you both, consider it solved; it worked like a charm :)
Logged
Pages: [1]   Go Up