More > JRiver Media Center 30 for Mac

Remove Hung Closing Parenthesis From Renamed Folder

<< < (5/14) > >>

AudibleImagery:

--- Quote from: zybex on February 17, 2023, 04:14:15 pm ---That's expected when not escaping the closing parenthesis. The problem is the escaping leaves the slash (bug?):

What about a workaround:
[Album Artist]//If(IsEmpty([Date],1),,[Date] -) [Album] If(IsEmpty([Catalog #,0]),,char(40)[Catalog #]char(41))


--- End quote ---

Hey Zybex,

I've evolved this renaming convention using the code you gave me from the album column thread. Here's what it is currently:

--- Code: ---[Album Artist]//trim(replace(replace([Album, 1],[Lossy],),[Incomplete],)) If(IsEmpty([Catalog #,0]),,char(40)[Catalog #]char(41))
--- End code ---

This is a step in the right direction for the folder structure I'm trying to create but a problem has arisen with the catalogue number that I don't know how to resolve. I sometimes combine different album presses for a variety of reasons, such as when I add Japanese bonus tracks to an American press to a create a fuller, more complete album. This is creating a problem where multiple folders are being created for one album because of there being multiple catalogue numbers for a single album. Other than throwing out the catalogue number renaming expression, can you offer a solution that could fix this problem?

lepa:
You could make a new field, say [Hybrid] and check it for this kind of hybrid albums. Then in your rename expression check also that if [hybrid] has a value, then don't use catalog # in the filename but use e.g. text (Hybrid) instead or nothing at all.

zybex:
What Lepa said :)

Just a minor edit to your expression - the Trim() should apply to the entire expression in order to remove the ending space when the Catalog# is empty:

[Album Artist]//trim(replace(replace([Album, 1],[Lossy],),[Incomplete],) If(IsEmpty([Catalog #,0]),,char(40)[Catalog #]char(41)))

AudibleImagery:

--- Quote from: lepa on March 05, 2023, 01:22:05 am ---You could make a new field, say [Hybrid] and check it for this kind of hybrid albums. Then in your rename expression check also that if [hybrid] has a value, then don't use catalog # in the filename but use e.g. text (Hybrid) instead or nothing at all.

--- End quote ---

I'm still new to these expressions and so how would I go about implementing this according to my current renaming expression?:
[Album Artist]//trim(replace(replace([Album, 1],[Lossy],),[Incomplete],) If(IsEmpty([Catalog #,0]),,char(40)[Catalog #]char(41)))

How would I tell the [Hybrid] field to 'check' for hybrid albums? Also, how would I tell the renaming expression to use the [Hybrid] value instead of the catalog # value?


--- Quote from: zybex on March 05, 2023, 04:52:24 am ---What Lepa said :)

Just a minor edit to your expression - the Trim() should apply to the entire expression in order to remove the ending space when the Catalog# is empty:

[Album Artist]//trim(replace(replace([Album, 1],[Lossy],),[Incomplete],) If(IsEmpty([Catalog #,0]),,char(40)[Catalog #]char(41)))

--- End quote ---

Hey zybex, this expression is adding an extra space at the beginning of the [catalogue #] field and so catalogue #'s are coming out like "Ink is My Drink  (Bandcamp)" (note the two spaces between the album title and catalogue #). The unedited expression is giving me no trouble.

zybex:
You're right, you actually need 2 trims to also remove the leftover space in [Album] after the "[Lossy]" is removed:

[Album Artist]//trim(trim(replace(replace([Album, 1],[Lossy],),[Incomplete],)) If(IsEmpty([Catalog #,0]),,char(40)[Catalog #]char(41)))

or moving the space around:
[Album Artist]//trim(replace(replace([Album, 1],[Lossy],),[Incomplete],))If(IsEmpty([Catalog #,0]),,/ char(40)[Catalog #]char(41))

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version