INTERACT FORUM

Please login or register.

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

Author Topic: Tracks + discs expression help  (Read 5276 times)

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7797
  • Autumn shade...
Tracks + discs expression help
« on: November 16, 2013, 01:57:21 pm »

Greetings!

I've been using the trial Windows version (plan to purchase a license when the trial's over in about 2 weeks - I already purchased a Linux license) and I've been customizing my panes columns and layout, but I've ran into a snag. I've using the following rules for file display for Panes...

Code: [Select]
[=save(0,v_tracks[album artist (auto)][album])1]=1 [=save(math(1+load(v_tracks[album artist (auto)][album])),v_tracks[album artist (auto)][album])1]=1 [=save(0,v_discs_[album artist (auto)]_[album])1]=1 [=save(math(max(max(0[disc #],1),load(v_discs_[album artist (auto)]_[album]))), v_discs_[album artist (auto)]_[album])1]=1
I'm also using the following expression for my Track/Total and Disc/Total columns...

Code: [Select]
[Track #] of load(v_tracks[album artist (auto)][album])
Code: [Select]
[Disc #] of load(v_discs_[album artist (auto)]_[album])
The problem is this, the total tracks for box sets/albums with multiple discs is capped at the total tracks for the entire set, not per disc. In the attachment, you'll see what I mean - it's displaying 81 tracks total for all discs, instead of the total tracks per disc. Single discs obviously display correctly How can I fix this to display correctly with multiple discs on the same album? Thanks in advance!

EDIT: I found another issue, this time Track/Total with 1 song for the album displays the total tracks with a 1, instead of the total tracks in the metadata. See the second attachment - it says 3 of 1, instead of 3 of 20 that's set in the metadata. How can I correct this one too?

Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Tracks + discs expression help
« Reply #1 on: November 19, 2013, 12:23:19 pm »

The problem is this, the total tracks for box sets/albums with multiple discs is capped at the total tracks for the entire set, not per disc. In the attachment, you'll see what I mean - it's displaying 81 tracks total for all discs, instead of the total tracks per disc. Single discs obviously display correctly How can I fix this to display correctly with multiple discs on the same album? Thanks in advance!

The global variables being used do not include Disc # uniqueness.  Add [Disc #] to the variable name, as in changing:

    v_tracks[album artist (auto)][album]

to

   v_tracks-[album artist (auto)]-[album]-[disc #]

Note that I added dashes in-between the fields - this will help prevent possible (but rare) collisions when the concatenation of album/album artist matches for two or more albums in your collection.  I tend to use the AlbumKey() function:

   v_tracks-albumkey()-[disc #]
Logged
The opinions I express represent my own folly.

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7797
  • Autumn shade...
Re: Tracks + discs expression help
« Reply #2 on: November 19, 2013, 12:32:35 pm »

Yes, thanks! That worked perfectly for box sets. However, the second issue with Track/Total remains (as seen in the second attachment).
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Tracks + discs expression help
« Reply #3 on: November 19, 2013, 05:37:10 pm »

If you have a field already set with the number of tracks / album, then you can use it instead of the calculated value.

The screenshot is only showing a single track available for the view - so the view can only create a summation for what remains in the view.  Where are the other 19 tracks?
Logged
The opinions I express represent my own folly.

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7797
  • Autumn shade...
Re: Tracks + discs expression help
« Reply #4 on: November 19, 2013, 06:06:26 pm »

Where are the other 19 tracks?

I never bothered getting them - was only interested in the one. :P
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Tracks + discs expression help
« Reply #5 on: November 19, 2013, 06:07:25 pm »

Case closed.  :-)
Logged
The opinions I express represent my own folly.

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7797
  • Autumn shade...
Re: Tracks + discs expression help
« Reply #6 on: November 19, 2013, 06:08:16 pm »

Case closed.  :-)

Indeed. :P I'll try to hunt down the other tracks - some of the compilations with single tracks like that are very rare. :P
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Tracks + discs expression help
« Reply #7 on: November 19, 2013, 06:11:46 pm »

What you can do, if you want to track these Track Counts, is create a new user field, and use your global calculations to assign it a value.  And then henceforth, just use/display that value.  For cases like this one where the value should be something else, you can just manually set it.

To manage this, I would use a view that shows both the calculated value and your user field.  Then, you can mass assign the value to those files that don't have it.  This way, your other views don't need to use the (slow) calculation methods, and instead can rely on the (fast) cached data from the user field.
Logged
The opinions I express represent my own folly.

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7797
  • Autumn shade...
Re: Tracks + discs expression help
« Reply #8 on: November 19, 2013, 06:12:37 pm »

An example/tutorial on how to do that, please? I'm still pretty new to the program, but I learn quick. ;)
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Tracks + discs expression help
« Reply #9 on: November 19, 2013, 07:01:29 pm »

The basic goals and steps:

1. Create new Custom Fields as type Integer, such as Total Discs and Total Tracks.

2. Modify your current view, or duplicate it and modify that view, and show these new fields as columns in the file list.  This will be a maintenance view where you set values for Totals Discs and Total Tracks when necessary.

3. Use the expression you already have in your relevant expression columns which show the calculated disk and track values.  Copy the relevant portion of the expression you need to assign the new user field, and use either the Tag Action Window or in-cell editing to do Field Assignment of the value of that expression:

   =expression

4. Once you have these fields set, you can remove these calculated rules and expression columns from your other views (leave them in your duplicated maintenance view).

Ask if you need more help.
Logged
The opinions I express represent my own folly.

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7797
  • Autumn shade...
Re: Tracks + discs expression help
« Reply #10 on: November 22, 2013, 11:33:50 am »

Okay, I attempted it... and failed so I rolled back everything to the last working setup. Do you have screenshots of everything with the required data to aid me? Thanks a lot for helping me through this and being patient! :)
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Tracks + discs expression help
« Reply #11 on: November 22, 2013, 11:39:55 am »

If you repost the current rules/expressions you're using (like in post #1) with the modifications made from our discussion above, I'll create a screen movie showing you how to do it.
Logged
The opinions I express represent my own folly.

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7797
  • Autumn shade...
Re: Tracks + discs expression help
« Reply #12 on: November 22, 2013, 11:43:05 am »

Thanks, you're the best! ;D

File display rules:

Code: [Select]
[=save(0,v_tracks-[album artist (auto)]-[album]-[disc #])1]=1 [=save(math(1+load(v_tracks-[album artist (auto)]-[album]-[disc #])),v_tracks-[album artist (auto)]-[album]-[disc #])1]=1 [=save(0,v_discs_[album artist (auto)]_[album])1]=1 [=save(math(max(max(0[disc #],1),load(v_discs_[album artist (auto)]_[album]))), v_discs_[album artist (auto)]_[album])1]=1
Disc/Total:

Code: [Select]
[Disc #] of load(v_discs_[album artist (auto)]_[album])
Track/Total:

Code: [Select]
[Track #] of load(v_tracks-[album artist (auto)]-[album]-[disc #])
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Tracks + discs expression help
« Reply #13 on: November 22, 2013, 11:58:41 am »

First thing, change your Disc/Total column to:

   firstnotempty([Disc #,0],1) of load(v_discs_[album artist (auto)]_[album])

so that you always get a value when Disc # is empty (i.e. "1 of 1", isntead of " of 1").

Second, if you have two tracks (from an album that has, say 20 tracks), and those tracks are numbers 3 and 12, what should the Track/Total column show?  3 of 2 and 12 of 2?
Logged
The opinions I express represent my own folly.

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7797
  • Autumn shade...
Re: Tracks + discs expression help
« Reply #14 on: November 22, 2013, 12:00:22 pm »

Is it possible to have it show 3 of 20?
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Tracks + discs expression help
« Reply #15 on: November 22, 2013, 12:07:29 pm »

Yes, just wanted to confirm.

I have an even easier solution for you now.  It will conditionally show your manually set value, or show the calculated value when no manual value is set.

Enjoy:

Edit: Sorry, hold on.  Shoddy production values.  BRB.

Edit:  Updated movie added:

    https://dl.dropboxusercontent.com/u/87189402/total%20tracks%202.mp4
Logged
The opinions I express represent my own folly.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Tracks + discs expression help
« Reply #16 on: November 22, 2013, 12:14:33 pm »

I updated the movie.  Some of the dialogs were out of the frame.
Logged
The opinions I express represent my own folly.

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7797
  • Autumn shade...
Re: Tracks + discs expression help
« Reply #17 on: November 22, 2013, 12:20:38 pm »

Yes, awesome, thanks a lot!!! I can hide that column when I don't need it, and the tracks will display correctly still, right? :D
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Tracks + discs expression help
« Reply #18 on: November 22, 2013, 12:24:25 pm »

That's correct, or just edit it in the Tag Action Window.
Logged
The opinions I express represent my own folly.

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7797
  • Autumn shade...
Re: Tracks + discs expression help
« Reply #19 on: November 22, 2013, 12:26:25 pm »

Awesome, it's perfect now. Thanks a whole lot for helping me sort this out. I've learned a great deal! :D
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Tracks + discs expression help
« Reply #20 on: November 22, 2013, 12:29:03 pm »

You're welcome.  Have a good weekend.
Logged
The opinions I express represent my own folly.

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7797
  • Autumn shade...
Re: Tracks + discs expression help
« Reply #21 on: December 03, 2013, 05:53:33 pm »

Again, I like to say thanks for helping me MrC. It's been working like a charm and I couldn't be happier. I'm also in the process of re-ripping the albums (mostly compilations) that weren't complete to 'fix' it another way. I can't do it for all of them, but thanks to you that's now a non-issue.

P.S. I also bought the MC19 Windows license too. Couldn't be happier!
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones
Pages: [1]   Go Up