INTERACT FORUM

Please login or register.

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

Author Topic: TotalTracks and TotalDiscs  (Read 4743 times)

arin

  • Junior Woodchuck
  • **
  • Posts: 97
TotalTracks and TotalDiscs
« on: January 18, 2014, 03:00:47 am »

Hi!
Could anybody tell me if it's possible to display the total number of tracks and discs of each album?
I search thoroughly both in the Windows and Mac version of JRiver but couldn't find any way to do that...but I'm a newbie nad surely I missed it...

Thanx!

arin
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: TotalTracks and TotalDiscs
« Reply #1 on: January 18, 2014, 03:38:49 am »

See if this is what you want:

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

There are different methods depending upon where you want to see the information.  Do you want to see the total number of tracks across all discs of the album?  Or total tracks / album disc?  Or both?
Logged
The opinions I express represent my own folly.

arin

  • Junior Woodchuck
  • **
  • Posts: 97
Re: TotalTracks and TotalDiscs
« Reply #2 on: January 18, 2014, 11:20:36 am »

Hi MrC,
thank you for your reply!

Actually I'm not really sure because, as I said, I'm a newbie…and with newbie I really mean it! ;)
I built a JRiver library with over 14.000 albums and in iTunes I used to populate two tag fields (TrackOf and DiscOf) which helped me to know how many tracks and discs every single album has.
I've been using JRiver for some months now and I discovered that those two tags are not available. Am I wrong?
I knew that JRiver, with the help of regex, is pretty powerful and could in someway calculate those values but for me is not that simple as I'm learning to use regex from scratch!

Sorry to bother you but…could you help me in some way? ?


Thanx a lot!

arin
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7398
  • The color of Spring...
Re: TotalTracks and TotalDiscs
« Reply #3 on: January 18, 2014, 11:41:31 am »

I built a JRiver library with over 14.000 albums and in iTunes I used to populate two tag fields (TrackOf and DiscOf) which helped me to know how many tracks and discs every single album has.

Yeah, I got spoiled there too. :P Fortunately, it's indeed possible to setup to display total tracks and discs but it does require some setting up but it's not too difficult. If you read that topic regarding my progress it's not too hard to figure out, but perhaps MrC can provide a video tutorial on how to properly setup both? However, if you want, I could try to help walk you through the procedure.

Also, perhaps we should suggest to the developers to support the Tracks/Total and Discs/Total fields as library fields out-of-the-box for those whom want them?
Logged
I don't work for JRiver... I help keep the forums safe from Viagra and other sources of sketchy pharmaceuticals.

Windows 11 2023 Update (23H2) 64-bit + Ubuntu 24.04 LTS Noble Numbat 64-bit | Windows 11 2023 Update (23H2) 64-bit (Intel N305 Fanless NUC 16GB RAM/256GB NVMe SSD)
JRiver Media Center 32 (Windows + Linux) | iFi ZEN DAC 3 | Edifier R2000DB Bookshelf Speakers | Audio-Technica ATH-M50x Headphones

arin

  • Junior Woodchuck
  • **
  • Posts: 97
Re: TotalTracks and TotalDiscs
« Reply #4 on: January 18, 2014, 03:54:39 pm »

Thank you Awesome Donkey, I really do appreciate your kind help. Tomorrow I will try to follow MrC suggestions and your procedure: should I failed (and I'm sure I will somehow!) I will ask again for help.
But I warmly support your suggestion about supporting Track/Total and Discs/Total fields out-of-the-box!;-)
Logged

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: TotalTracks and TotalDiscs
« Reply #5 on: January 19, 2014, 03:43:20 am »

+1

It really bothers me that Media Center clears out the total from disc/track tags.
Logged

arin

  • Junior Woodchuck
  • **
  • Posts: 97
Re: TotalTracks and TotalDiscs
« Reply #6 on: January 19, 2014, 11:55:41 am »

I got it!!!
I supposed to be completely dumb about expressions…but I'm beginning to learn.
Ok, I must admit I only thoroughly followed MrC and Awesome Donkey instructions…without worrying to understand deeply all the expressions I copied&pasted…

My only doubt is: what if some of my albums (that I assume to be complete, as I ripped most of them personally) has some tracks missing?
That value (Track/Total) is calculated on the number of the existing tracks per album, am I right?

Mmmm…stil a lot to learn!

Anyway thank you MrC and Awesome Donkey for your kind and fast help!
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7398
  • The color of Spring...
Re: TotalTracks and TotalDiscs
« Reply #7 on: January 19, 2014, 12:42:32 pm »

My only doubt is: what if some of my albums (that I assume to be complete, as I ripped most of them personally) has some tracks missing?

This is another issue I ran into, but thankfully MrC walked me through it by adding a field called Total Tracks that allowed me to override what MC displayed to display the correct total amount of tracks. His video he posted, I believe, explains the procedure.

Should I start a new topic to officially request Total/Tracks and Total/Discs to be supported in MC, so people can vote?
Logged
I don't work for JRiver... I help keep the forums safe from Viagra and other sources of sketchy pharmaceuticals.

Windows 11 2023 Update (23H2) 64-bit + Ubuntu 24.04 LTS Noble Numbat 64-bit | Windows 11 2023 Update (23H2) 64-bit (Intel N305 Fanless NUC 16GB RAM/256GB NVMe SSD)
JRiver Media Center 32 (Windows + Linux) | iFi ZEN DAC 3 | Edifier R2000DB Bookshelf Speakers | Audio-Technica ATH-M50x Headphones

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7398
  • The color of Spring...
Re: TotalTracks and TotalDiscs
« Reply #8 on: January 19, 2014, 01:24:30 pm »

And here's something related worth mentioning. I'm currently converting my entire music library from ALAC to FLAC, and I've noticed that MC, when converting, strips the Tracks/Total and Discs/Total metadata from the newly converted FLAC files. For an example let's say I have a ALAC track that has 13/16 listed as the track number and 1/3 set for the disc. When MC converts the file to FLAC it strips this; 13 for the track and 1 for the disc. Would it not be easier to write the totals to Tracks Total and Discs Total instead of just removing it? I noticed it strips other fields too like rating and dynamic range information.

I'll have to figure out how to mass write Tracks Total and Discs Total back to all tracks in my library (based on the library data, as MC seems to have 'remembered it') and for MC to read it. MrC, any ideas?
Logged
I don't work for JRiver... I help keep the forums safe from Viagra and other sources of sketchy pharmaceuticals.

Windows 11 2023 Update (23H2) 64-bit + Ubuntu 24.04 LTS Noble Numbat 64-bit | Windows 11 2023 Update (23H2) 64-bit (Intel N305 Fanless NUC 16GB RAM/256GB NVMe SSD)
JRiver Media Center 32 (Windows + Linux) | iFi ZEN DAC 3 | Edifier R2000DB Bookshelf Speakers | Audio-Technica ATH-M50x Headphones

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: TotalTracks and TotalDiscs
« Reply #9 on: January 19, 2014, 02:21:01 pm »

If you have your user fields for Total Tracks and Total Discs derived from the calculated view / expression we created, you can just use that same view with only one file type and re-assign the calculated values to your user fields for the converted files without them.

For values which are in one file type but not yet in the converted ones, create a view that sorts the originals uniquely, and Copy (which copies the tag values).  Then, switch the file type to the converted files, sorted the same way, and Paste Tags, selecting only the tag values you care about.
Logged
The opinions I express represent my own folly.

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7398
  • The color of Spring...
Re: TotalTracks and TotalDiscs
« Reply #10 on: January 19, 2014, 03:23:04 pm »

Yep, I can. However, it's already gone through over 30k in Apple Lossless files, so I'll just reserve doing that for the special cases. ;) Like 6233638, I am alarmed that MC removes/alters the fields in the first place. What would be the reasoning behind that?
Logged
I don't work for JRiver... I help keep the forums safe from Viagra and other sources of sketchy pharmaceuticals.

Windows 11 2023 Update (23H2) 64-bit + Ubuntu 24.04 LTS Noble Numbat 64-bit | Windows 11 2023 Update (23H2) 64-bit (Intel N305 Fanless NUC 16GB RAM/256GB NVMe SSD)
JRiver Media Center 32 (Windows + Linux) | iFi ZEN DAC 3 | Edifier R2000DB Bookshelf Speakers | Audio-Technica ATH-M50x Headphones

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: TotalTracks and TotalDiscs
« Reply #11 on: January 19, 2014, 04:17:02 pm »

The Disc # and Track # fields are Integer fields, and I'd guess are going to remain that way.  Changing these has large implications.

One possible light-weight workaround could be to retain original tag data via import, by placing the data in some field such as Comments or a special Original Tags fields.  With this, the data could be made available to users from within MC to populate other fields.  But even still, this will have a large impact on each of the input plugins (mp3, ape, flac, etc.) as they have to be modified to accommodate this change.  Matt always dreads having to hit all this code at once; the last time this was done was for Artist and Genre being converted to List types.

I'd hazard a guess that most users don't care about Disc Total and Track Totals, so this has always been low priority.  And since there may not be standardization across formats, nor does YADB support the values, even lower priority.

So you can use external tools to grab the data, or perhaps even MC's Tag() function.  I just wrote a scriptlet for pscriptor which grabs raw tag values and stores them within an MC field - perhaps this is another method.
Logged
The opinions I express represent my own folly.

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7398
  • The color of Spring...
Re: TotalTracks and TotalDiscs
« Reply #12 on: January 19, 2014, 05:42:22 pm »

Makes sense, thanks a lot for explaining it. I'm not really too concerned about it removing total discs/tracks from each song's metadata - as long as I can override it for incomplete albums, which I can (and save in the metadata), all is well. :D

But, is MC stripping metadata it added (dynamic range, rating, etc. from the Analyze Audio feature) when converting files from Apple Lossless to FLAC a 'bug'? Sure, updating tags from library information restores the dynamic range information, but it doesn't restore rating (ratings are all 0, so maybe that's why update tags doesn't add it back since it's not listed in the library fields as an acceptable value, which I can't edit to add 0 as an acceptable value, which begs the question why MC adds it in the first place when analyzing audio if there's no valid value to add?).
Logged
I don't work for JRiver... I help keep the forums safe from Viagra and other sources of sketchy pharmaceuticals.

Windows 11 2023 Update (23H2) 64-bit + Ubuntu 24.04 LTS Noble Numbat 64-bit | Windows 11 2023 Update (23H2) 64-bit (Intel N305 Fanless NUC 16GB RAM/256GB NVMe SSD)
JRiver Media Center 32 (Windows + Linux) | iFi ZEN DAC 3 | Edifier R2000DB Bookshelf Speakers | Audio-Technica ATH-M50x Headphones

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: TotalTracks and TotalDiscs
« Reply #13 on: January 19, 2014, 06:49:27 pm »

MC doesn't import audio dynamics information, because it calculates its own.

iTunes doesn't export Rating information into tags - they are in the iTunes database.  Use iTunes Synchronizer in the 3rd party area if you want to sycnh your Ratings and play stats.

0 isn't an acceptable Rating value.  Rating is either Empty (which implies 0), or 1 through 5.
Logged
The opinions I express represent my own folly.

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7398
  • The color of Spring...
Re: TotalTracks and TotalDiscs
« Reply #14 on: January 19, 2014, 07:39:02 pm »

MC doesn't import audio dynamics information, because it calculates its own.

Yes, I'm aware of that. However, I originally calculated the audio dynamic information (dynamic range, peak level, etc.) for the Apple Lossless files in MC itself, not iTunes. And no, there was no rating information either in the metadata but MC added it after running the analysis (30 or so builds ago when I ran the analysis on my library). Ultimately, however, the MC calculated information for the Apple Lossless files isn't carried over automatically to the MC-converted/tagged FLAC files. That's what I'm saying. Perhaps the information system has changed in the last 30 or so builds since I originally used the analyze audio feature on all my files? I noticed that Tempo changed to BPM since then, for example.

iTunes doesn't export Rating information into tags - they are in the iTunes database.  Use iTunes Synchronizer in the 3rd party area if you want to sycnh your Ratings and play stats.

Again, in this case it isn't iTunes (thankfully) nor do I have any desire to sync with iTunes ever again (uninstalled for good). :P

0 isn't an acceptable Rating value.  Rating is either Empty (which implies 0), or 1 through 5.

Yeah, I've just disabled rating to be saved in the tags, and I'll use MC to mass-remove rating from all files once the conversion to FLAC is done (got about 22k files remaining).

I'm thinking this discussion should be split into it's own topic, yes? I'll be posting more soon about this with screenshot examples once the mass conversion is done!
Logged
I don't work for JRiver... I help keep the forums safe from Viagra and other sources of sketchy pharmaceuticals.

Windows 11 2023 Update (23H2) 64-bit + Ubuntu 24.04 LTS Noble Numbat 64-bit | Windows 11 2023 Update (23H2) 64-bit (Intel N305 Fanless NUC 16GB RAM/256GB NVMe SSD)
JRiver Media Center 32 (Windows + Linux) | iFi ZEN DAC 3 | Edifier R2000DB Bookshelf Speakers | Audio-Technica ATH-M50x Headphones

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: TotalTracks and TotalDiscs
« Reply #15 on: January 19, 2014, 07:50:02 pm »

All the Dynamic audio fields are calculated values - they are only filled in by running Analyze.  It wouldn't necessarily make sense to use the same values after a convert.

At least one audio analysis field is removed (Intensity).  Others are generated for backwards compatibility.

Basically, you should reanalyze the new files.
Logged
The opinions I express represent my own folly.

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7398
  • The color of Spring...
Re: TotalTracks and TotalDiscs
« Reply #16 on: January 19, 2014, 07:56:48 pm »

Yeah, I'll do that once everything's converted. After it's done, I'll clear out the tags I added back via the Update Tags (from library) feature. Then, I'll run Update Library (from tags) so MC's all synced and clean with the tags. Finally I'll run the analysis on all files once again. It'll take a few days to complete the analysis, but it's worth it. ;) Perhaps by Thursday I'll be all setup and good to go again!

Thanks! :)
Logged
I don't work for JRiver... I help keep the forums safe from Viagra and other sources of sketchy pharmaceuticals.

Windows 11 2023 Update (23H2) 64-bit + Ubuntu 24.04 LTS Noble Numbat 64-bit | Windows 11 2023 Update (23H2) 64-bit (Intel N305 Fanless NUC 16GB RAM/256GB NVMe SSD)
JRiver Media Center 32 (Windows + Linux) | iFi ZEN DAC 3 | Edifier R2000DB Bookshelf Speakers | Audio-Technica ATH-M50x Headphones

arin

  • Junior Woodchuck
  • **
  • Posts: 97
Re: TotalTracks and TotalDiscs
« Reply #17 on: January 21, 2014, 04:47:52 am »

As Awesome Donkey, if MC has a workaround, I don't care too to have those tags anyway.

MrC, you said a very interesting thing…

Quote
So you can use external tools to grab the data, or perhaps even MC's Tag() function.  I just wrote a scriptlet for pscriptor which grabs raw tag values and stores them within an MC field

Could I kindly ask you to share your scriptlet with us?
Or at least explain to all of us newbie how to use  the Tag() function in this specific case.

Thank you for your help! :)
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: TotalTracks and TotalDiscs
« Reply #18 on: January 21, 2014, 12:40:17 pm »

Can you make a file available for me to test with?  That way, I have the exact track you have, and can be sure to give the best advice.  perhaps Dropbox and PM me a link.  I'll delete the file when we're done, of course.
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: TotalTracks and TotalDiscs
« Reply #19 on: January 22, 2014, 12:39:11 pm »

I received your file, thanks.

Here's an easy way for you to populate your Total Tracks and Total Discs fields.

I'll assume you've already created Integer fields called Total Tracks and Total Discs.  Add those to your file list view, so you can tag them (of course, you could tag in the Tag Action Window instead of in a column).

Select all the files you want to update with these fields.

For Total Tracks, edit the cell for Total Tracks with F2, and enter the expression:

   =listitem(tag(Track #),1,//)

and press Return.  For Total Discs, use this expression:

   =listitem(tag(Disc #),1,//)

That's it.  Note that the Tag() function is slow, since it has to read the actual raw tags from disk, so only use it to do this type of assignment (in other words, don't use it in a view generally).
Logged
The opinions I express represent my own folly.

arin

  • Junior Woodchuck
  • **
  • Posts: 97
Re: TotalTracks and TotalDiscs
« Reply #20 on: January 30, 2014, 10:24:09 am »

Hi MrC,
at last I managed to try your suggestion and, of course, it worked.
Could you only suggest the best method to permanently write the result of the calculated expression on a custom tag so that I could automatically retag the 200.000 tracks I have in my library without having MC to calculate those values very time?
Or I missed the point completely and once the expression calculates the value it writes it "permanently" as I wanted?

Sorry to bother you further but…what if I would like to make MC to read another tag I used in iTunes that's called Season?
Could you help me with that too?
In the file I sent you that tag was populated…

Thank you for your patience! ;)
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: TotalTracks and TotalDiscs
« Reply #21 on: January 30, 2014, 03:26:09 pm »

Hi MrC,
at last I managed to try your suggestion and, of course, it worked.
Could you only suggest the best method to permanently write the result of the calculated expression on a custom tag so that I could automatically retag the 200.000 tracks I have in my library without having MC to calculate those values very time?
Or I missed the point completely and once the expression calculates the value it writes it "permanently" as I wanted?

That's the point of the expressions above.  They permanently tag your new fields; the expression reads the raw tag values in the files and assigns them to MC's database fields Total Tracks and Total Discs.

Sorry to bother you further but…what if I would like to make MC to read another tag I used in iTunes that's called Season?
Could you help me with that too?
In the file I sent you that tag was populated…

I don't see that tag in the Ballades ALAC track you sent.  So probably iTunes did not write it out to the file.  If you can't get iTunes to write the tag value to the file, you could probably export an iTunes XML file and convert it.

You can see which raw tags are in the files in MC.  Select a file, and open the Tag Action Window.  Then, click the very first line which shows the file type, duration and size.  It will expand a raw tag window.  You'll see there is no Season tag in the file.
Logged
The opinions I express represent my own folly.
Pages: [1]   Go Up