INTERACT FORUM
More => Old Versions => JRiver Media Center 18 for Mac => Topic started by: thunderlips222 on September 10, 2013, 08:37:31 am
-
I'd like to set up the file renaming tool so any albums with multiple artists get renamed as [track #] [artist] - [name] while any albums with just 1 artist get renamed [track #] [name]
-
[Track #]ifelse(isequal([album artist (auto)], /(Multiple Artists/)), / [artist] -) [Name]
-
Thx MrC, I'm sure this will be simple for me soon when I learn the expression language
-
(http://i42.tinypic.com/2a0cmrm.jpg)
Hi again, so this is what's showing up when I copy/paste that.
For me to understand the language better, is this how you'd explain the expression you posted?
track number first, stays the same regardless of what kind of album it is
guessing there should then be a space
ifelse is for nesting if/then situations
the isequal is the first if/then sequence, here it's set so that if album artist (auto) = (Multiple Artists) you'll see the artist name before the track name. the slash marks before the parentheses make sure the parentheses are treated as characters, not as expression containers.
where i'm lost:
the floating slash mark before artist I don't understand. The parentheses after the hyphen show up in the filename. There's a 0,/ after the track # for both songs and for both songs the artist comes up even though only one has a (Multiple Artists) value.
-
it appears MC18 for the Mac still has problems with the escape character in the expression language. So use this until it gets fixed:
[Track #] ifelse(isequal([album artist (auto)], Multiple Artists, 7), [artist] -) [Name]
-
Thx!
So close. There are 2 spaces for non-album-artist tracks between the track # and song name.
-
Yup, sorry, I didn't notice due to the font I use.
Since we can't easily escape the trailing space (yet), just do this:
if(isequal([Album Artist (auto)], Multiple Artists, 7), [Track #] [Artist] - [Name], [Track #] [Name])
An internal space doesn't need escaping.
-
I'd like to set up the file renaming tool so any albums with multiple artists get renamed as [track #] [artist] - [name] while any albums with just 1 artist get renamed [track #] [name]
Hey this is a great idea. :)
Thanks for asking, I have actually added this "feature" to my renaming script.
Works really well for soundtracks/compilation albums.
-
glad to hear, it was just the way I had things sep up on foobar.
The tricky part for me now is Directory Rules.
I'm moving my files to folders based on a relational Genre field (Genre2) I created. This is because I have artists scattered across diff. folders. and want to consolidate them by genre without manually mislabeling certain artists with different genres.
With compilations/mutliple artist albums my plan is to manually change the Genre tag instead of using Genre2. Since a lot of the compilations already have 2 or 3 artists with Genre2, if I changed them it would change those Genre2 tags for non-compilation tracks by the same artist.
With the same logic I tried to set up the Directory rule so if it is a compilation, the directory rule is looking at genre but if it's not the directory rule is looking at genre2
if(isequal([Album Artist (auto)], Multiple Artists, 7), [genre]/[artist] - [album] ([year]), [genre2]/[artist] - [album] ([year])
It gives me back:
Base Path
/1, Electronic/(Multiple Artists) - After Dark 2 (2013)/
-
I'm moving my files to folders based on a relational Genre field (Genre2) I created. This is because I have artists scattered across diff. folders. and want to consolidate them by genre without manually mislabeling certain artists with different genres.
With compilations/mutliple artist albums my plan is to manually change the Genre tag instead of using Genre2. Since a lot of the compilations already have 2 or 3 artists with Genre2, if I changed them it would change those Genre2 tags for non-compilation tracks by the same artist.
With the same logic I tried to set up the Directory rule so if it is a compilation, the directory rule is looking at genre but if it's not the directory rule is looking at genre2
if(isequal([Album Artist (auto)], Multiple Artists, 7), [genre]/[artist] - [album] ([year]), [genre2]/[artist] - [album] ([year])
It gives me back:
Base Path
/1, Electronic/(Multiple Artists) - After Dark 2 (2013)/
Bear with me because I'm not good with scripts so do correct me if I'm getting your idea confused. You've set up a relational field called [Genre2] right? And what field is it tied to? (Relational fields are insanely powerful but are restricted to only [Artist/Series/Album]) I'm guessing [Genre2] is tied to [Artist].
i.e. You are setting every specific artist to a "super" genre so to speak. e.g. Michael Jackson would likely have a [Genre2] of "Pop" although he could still have plenty of songs with different genres in [Genre]
Thus a compilation album would use [genre]/[artist] - [album] ([year])
A single artist album would use [genre2]/[artist] - [album] ([year])
Two questions, did you check if you were closing your parenthesis for your if(...) function?
MrC has corrected me, the 2nd question is my own error:
And did you check whether your function was testing for (Multiple Artists) instead of Multiple Artists? The code you pasted looks like it will fail because [Album Artist (auto)] is going to return (Multiple Artist), therefore a isEqual() for Multiple Artist will fail and it is correctly returning [genre2].
-
The errors in the expression are due to the forward slash escape characters. JRiver hasn't yet worked out all the niggles. Forward slash is the escape character, yet is also the path separator character in Unix/Linux/Mac/POSIX file systems.
Until these wrinkles are worked out, you need to write expressions in such a way as to avoid having to use forward slashes.
I'll provide some techniques if you need them.
And did you check whether your function was testing for (Multiple Artists) instead of Multiple Artists? The code you pasted looks like it will fail because [Album Artist (auto)] is going to return (Multiple Artist), therefore a isEqual() for Multiple Artist will fail and it is correctly returning [genre2].
Mode 7 of IsEqual() (http://wiki.jriver.com/index.php/Media_Center_expression_language#IsEqual) means sub-string compare. We used this mode to avoid having to escape the parens with the problematic forward slash.