More > JRiver Media Center 30 for Mac
Writing an Expression to Group an Album Column by Omitting Two Words
AudibleImagery:
--- Quote from: zybex on February 28, 2023, 03:04:23 am ---I blame my mother, she was always asking me to make funny expressions with my face. Alsho, I'm a shoftware developer and learned Lisp back when funcshional languagesh where shtill cool ::)
Try Zelda, it helps tinkering with expressions until you get the desired result. There's also a Wiki with the language ins and outs.
Shouldn't the [Album] name be the same for these and [Disc #] be used to store the 1-2-3 disc number? Then you can use both those fields to group and sort by.
--- End quote ---
Hey I'll check out Zelda and also sit down to study the main Wiki articles about the expressions. I've done that before and so maybe if I keep reading it one day it'll finally make sense.
I don't want the album name to be the same. I don't understand why anyone would want that. Sometimes I just like to listen to a specific disc and I don't want to have to go looking through the discs to find the track and then start it that way, especially because I have some multi-disc sets that have 20 discs or so in them. I'm willing to hear your rationale but to me it seems impractical.
zybex:
--- Quote from: AudibleImagery on February 28, 2023, 04:18:46 am ---I don't want the album name to be the same. I don't understand why anyone would want that.
--- End quote ---
It's a matter of preference I guess. I think that a given album having 1 or 5 discs is just a consequence of the size limit of a CD, and rarely an artistic thing. If a 100-track album could fit in one CD they would publish it in one, not 7 or 10; so it's one logical Album, split in X parts. MC can still group each Disc# as a separate list anyway. And, you ARE trying to group them together...
Also, because this expression to fix that is cumbersome to say the least. Why don't you just manually rename them to numeric values like "Disc 01" so that it naturally sorts?
--- Code: ---FirstNotEmpty(ListClean(Listmix(/#ifcase([Album]],8,disc [L1],replace([Album]],Disc [L1],Disc padNumber([N],3)))#/,0,One;Two;Three;Four;Five;Six;Seven;Eight;Nine;Ten;Eleven;Twelve;Thirteen;Fourteen;Sixteen;Seventeen;Eighteen;Nineteen;TooManyteen),3),[Album]])
--- End code ---
zybex:
There's a better way to keep your current Album names without using that eye sore expression:
- populate the [Disc #] on those albums, matching the name with the value, eg: "Best 1000 Polka Songs of the Eighties (Disc Seventy Nine)" -> set [Disc #] to 79 (you can leave Disc# blank for single-disk albums)
- Then you can use this for grouping/sorting:
Replace([Album], /(Disc/ ,/(Disc PadNumber([Disc #], 3)/ )
.. or, populate the [Disc #], remove the "(Disc Umpteen)" from the [Album] names, and create a second calculated field called [Album (Disc #)] with expression:
if(isEmpty([Disc #]),[Album],[Album] /(Disc [Disc #]/))
Now you have both a simple [Album] and a composite "[Album (Disc #)]" that you can use/display where needed.
AudibleImagery:
--- Quote from: zybex on February 28, 2023, 04:48:29 am ---Also, because this expression to fix that is cumbersome to say the least. Why don't you just manually rename them to numeric values like "Disc 01" so that it naturally sorts?
--- End quote ---
I decided to name them "(Disc 01), (Disc 02), (Disc 03), etc" for the time being, although I don't like how it looks.
--- Quote from: zybex on February 28, 2023, 05:07:27 am ---There's a better way to keep your current Album names without using that eye sore expression:
- populate the [Disc #] on those albums, matching the name with the value, eg: "Best 1000 Polka Songs of the Eighties (Disc Seventy Nine)" -> set [Disc #] to 79 (you can leave Disc# blank for single-disk albums)
- Then you can use this for grouping/sorting:
Replace([Album], /(Disc/ ,/(Disc PadNumber([Disc #], 3)/ )
.. or, populate the [Disc #], remove the "(Disc Umpteen)" from the [Album] names, and create a second calculated field called [Album (Disc #)] with expression:
if(isEmpty([Disc #]),[Album],[Album] /(Disc [Disc #]/))
Now you have both a simple [Album] and a composite "[Album (Disc #)]" that you can use/display where needed.
--- End quote ---
I'm interested in implementing this solution in the near future but I want to come back to it after I've resolved a couple of issues with you from our thread about Renaming Files. One question I have though is if it would still be possible (using the above expression) to sort my folder structure with the Disc # in the folder name or folder structure?
zybex:
Yes, you could then use [Disc #] or [Album (Disc #)] in the Rename/Copy tool to rename your actual folders and files if you wish.
Navigation
[0] Message Index
[*] Previous page
Go to full version