More > JRiver Media Center 30 for Mac

Remove Hung Closing Parenthesis From Renamed Folder

<< < (12/14) > >>

AudibleImagery:

--- Quote from: zybex on March 28, 2023, 08:19:45 pm ---That's a really bad screenshot, barely readable. Please don't resize them. Is that a forward slash in the [Album] name? If so, I can guess what that does when you put that in the Copy/Rename/Move tool.

Also, does the album only have 2 tracks? This function will look at all tracks in a given album, so it's relevant to see it all to prevent surprises.

Try adding an Expression column to your view with the Expression you're testing, you'll likely see the correct results. It's just when renaming something with slashes that the results change. If so it's a bug that needs to be addressed by the developers.

--- End quote ---

I added an expression column and did some testing and it seems that the only issue arises with albums titles that have a slash. I have "Replace slashes in expressions" checked because without it my Mac will interpret the slashes in any album titles as new folders and my Renaming situation is a bit of a catch-22. I think I'm going to use the newest expression for the time being and hope that this bug gets patched out in the next update. Nonetheless, thank you for this expression!

The only remaining issue I have regarding the Renaming expression is to do something similar to what we did with Catalog numbers but with the [Date] field. I'd like to chronologically list all possible dates for an album at the beginning of the folder name but if there's more than two dates I'd like to just list the first and last dates separated by a dash as in '1962-1968 - Untamed Hawk', and if there is no date then enter nothing and leave the folder as is. Is this possible?

zybex:
Yes, it seems like it's a bug on the handling on slashes on the RMC tool on the Mac. The workaround is to add the code to a new calculated field instead of putting it directly on the rename tool.

Additionally, it sounds like you have albums with different [Date] on its tracks, and that may cause the previous expression to fail in some cases because it was grouping files by Year as well. Try this:

1. Create a calculated field called "Album Artist - Album" with expression:

--- Code: --- [Album Artist (Auto)] - [Album]
--- End code ---

2. Create a calculated field called "Album (renamed)" with expression:

--- Code: ---save(FieldQuery(Album Artist - Album,[Album Artist - Album],Catalog #,1,0),_catlist)/
save(if(isempty([_catlist]),/(replace([_catlist],;,/,/ )/),), _catalog)/
save(trim(replace(replace(replace([Album],[Lossy],),[Incomplete],),//,_)),_album)/
save(FieldQuery(Album Artist - Album,[Album Artist - Album],Date /(Year/),1,0),_dates)/
save(ifcase(listcount([_dates]),6,2,/[listmath([_dates],0)-listmath([_dates],1)/],1,/[[_dates]/],0,,),_years)/
trim([_years] [_album] [_catalog])
--- End code ---

3. On the rename tool, use this expression:

--- Code: ---[Album Artist (auto)]//[Album (renamed)]
--- End code ---

You can add columns for "Album Artist - Album" and "Album (renamed)" to your view to see if they're OK.

AudibleImagery:

--- Quote ---Yes, it seems like it's a bug on the handling on slashes on the RMC tool on the Mac. The workaround is to add the code to a new calculated field instead of putting it directly on the rename tool.

--- End quote ---

Regarding using a calculated field instead of putting it directly on the rename tool, didn't you say before that this would drastically slow down the UI for a large library such as mine (170,000 songs at 4.4TB)?

Speaking of slowing down a library, I tried to use the newest Rename expression on my entire library to check if there were any files that need to be renamed and the rename tool has been hung for the better part of eight hours now. Can I expect it to eventually work or is it safe for me to assume that JRiver is stuck and needs to be restarted? I'm wondering if the new expression is even usable given the amount of time it's taking to check my library for new renames, which usually takes my library around 20 minutes.


--- Quote ---Additionally, it sounds like you have albums with different [Date] on its tracks, and that may cause the previous expression to fail in some cases because it was grouping files by Year as well. Try this:

--- End quote ---

I do have albums with different [Date] on some tracks but I want to list these in the folder name in the aforementioned format. Is that what your new proposed expression intends to accomplish? Also would I need to worry about this new expression drastically slowing down my library?

zybex:

--- Quote from: AudibleImagery on April 01, 2023, 06:41:03 pm ---Regarding using a calculated field instead of putting it directly on the rename tool, didn't you say before that this would drastically slow down the UI for a large library such as mine (170,000 songs at 4.4TB)?

--- End quote ---
Only if you use the field in a View, then the view becomes slow, depending on how many files the view is showing at a time.


--- Quote ---Speaking of slowing down a library, I tried to use the newest Rename expression on my entire library to check if there were any files that need to be renamed and the rename tool has been hung for the better part of eight hours now. Can I expect it to eventually work or is it safe for me to assume that JRiver is stuck and needs to be restarted? I'm wondering if the new expression is even usable given the amount of time it's taking to check my library for new renames, which usually takes my library around 20 minutes.

--- End quote ---
Ouch. 8 hours is too much. I'd say kill it. Fieldquery() is not efficient, but I think that's just hung, not slow. Check if your CPU usage is high or low - if it's low, it's just stuck.


--- Quote ---I do have albums with different [Date] on some tracks but I want to list these in the folder name in the aforementioned format. Is that what your new proposed expression intends to accomplish? Also would I need to worry about this new expression drastically slowing down my library?

--- End quote ---
The new expression takes care of the dates. I suggest you do a backup of the library, then add the Fields I mentioned and try to use the Rename tool again, but not on too many files in one go. Definitely not on the entire library in a single pass.

AudibleImagery:

--- Quote from: zybex on April 01, 2023, 05:13:19 am ---Additionally, it sounds like you have albums with different [Date] on its tracks, and that may cause the previous expression to fail in some cases because it was grouping files by Year as well. Try this:

1. Create a calculated field called "Album Artist - Album" with expression:

--- Code: --- [Album Artist (Auto)] - [Album]
--- End code ---

2. Create a calculated field called "Album (renamed)" with expression:

--- Code: ---save(FieldQuery(Album Artist - Album,[Album Artist - Album],Catalog #,1,0),_catlist)/
save(if(isempty([_catlist]),/(replace([_catlist],;,/,/ )/),), _catalog)/
save(trim(replace(replace(replace([Album],[Lossy],),[Incomplete],),//,_)),_album)/
save(FieldQuery(Album Artist - Album,[Album Artist - Album],Date /(Year/),1,0),_dates)/
save(ifcase(listcount([_dates]),6,2,/[listmath([_dates],0)-listmath([_dates],1)/],1,/[[_dates]/],0,,),_years)/
trim([_years] [_album] [_catalog])
--- End code ---

3. On the rename tool, use this expression:

--- Code: ---[Album Artist (auto)]//[Album (renamed)]
--- End code ---

You can add columns for "Album Artist - Album" and "Album (renamed)" to your view to see if they're OK.

--- End quote ---

Hi again,

Do I need to be concerned about the slashes in the second expression affecting anything due to the Mac slash bug? Also are the first two calculated fields supposed to have the following Data Type, Relational, and Edit Type settings?:



--- Quote from: zybex on April 01, 2023, 08:04:59 pm ---The new expression takes care of the dates. I suggest you do a backup of the library, then add the Fields I mentioned and try to use the Rename tool again, but not on too many files in one go. Definitely not on the entire library in a single pass.

--- End quote ---

I tried the new expression but it's putting '()' at the end of the album title where the catalog number is supposed to be regardless of if there's a catalog number value or not.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version