INTERACT FORUM

Please login or register.

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

Author Topic: Remove Hung Closing Parenthesis From Renamed Folder  (Read 6263 times)

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2616
Re: Remove Hung Closing Parenthesis From Renamed Folder
« Reply #50 on: March 28, 2023, 07:06:33 pm »

It's easier if you attach a screenshot showing a full album with these columns visible:
Artist, album artist, album, album - artist (year), catalog #, ... And other fields you might consider relevant.
Logged

AudibleImagery

  • World Citizen
  • ***
  • Posts: 108
Re: Remove Hung Closing Parenthesis From Renamed Folder
« Reply #51 on: March 28, 2023, 07:10:58 pm »

Look for trailing spaces.  Edit them as a whole.

No trailing spaces to be found.
Logged

AudibleImagery

  • World Citizen
  • ***
  • Posts: 108
Re: Remove Hung Closing Parenthesis From Renamed Folder
« Reply #52 on: March 28, 2023, 07:17:55 pm »

It's easier if you attach a screenshot showing a full album with these columns visible:
Artist, album artist, album, album - artist (year), catalog #, ... And other fields you might consider relevant.

Here's a screenshot with the fields you asked for. This is one of the albums in which the newest Renaming expression removed the Catalog number from the folder name:
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2616
Re: Remove Hung Closing Parenthesis From Renamed Folder
« Reply #53 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.
Logged

AudibleImagery

  • World Citizen
  • ***
  • Posts: 108
Re: Remove Hung Closing Parenthesis From Renamed Folder
« Reply #54 on: March 29, 2023, 12:01:52 am »

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. It so it's a bug that needs to be addressed by the developers.

I don't know why the image is so low quality. I didn't resize it. I uploaded to imgbb.com and copied the link over.

There is a forward slash in the album name but I have "Replaces slashes in expressions" checked in the Rename tool. Otherwise slashes creat havoc for me.

It's a 12" and so there are only two tracks.

I'll try the expression in an expression column and follow-up with the results.
Logged

AudibleImagery

  • World Citizen
  • ***
  • Posts: 108
Re: Remove Hung Closing Parenthesis From Renamed Folder
« Reply #55 on: April 01, 2023, 12:13:41 am »

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.

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?
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2616
Re: Remove Hung Closing Parenthesis From Renamed Folder
« Reply #56 on: April 01, 2023, 05:13:19 am »

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: [Select]
[Album Artist (Auto)] - [Album]
2. Create a calculated field called "Album (renamed)" with expression:
Code: [Select]
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])

3. On the rename tool, use this expression:
Code: [Select]
[Album Artist (auto)]//[Album (renamed)]
You can add columns for "Album Artist - Album" and "Album (renamed)" to your view to see if they're OK.
Logged

AudibleImagery

  • World Citizen
  • ***
  • Posts: 108
Re: Remove Hung Closing Parenthesis From Renamed Folder
« Reply #57 on: April 01, 2023, 06:41:03 pm »

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.

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:

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?
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2616
Re: Remove Hung Closing Parenthesis From Renamed Folder
« Reply #58 on: April 01, 2023, 08:04:59 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)?
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.
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?
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.
Logged

AudibleImagery

  • World Citizen
  • ***
  • Posts: 108
Re: Remove Hung Closing Parenthesis From Renamed Folder
« Reply #59 on: April 05, 2023, 06:13:49 pm »

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: [Select]
[Album Artist (Auto)] - [Album]
2. Create a calculated field called "Album (renamed)" with expression:
Code: [Select]
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])

3. On the rename tool, use this expression:
Code: [Select]
[Album Artist (auto)]//[Album (renamed)]
You can add columns for "Album Artist - Album" and "Album (renamed)" to your view to see if they're OK.

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?:


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.

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.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2616
Re: Remove Hung Closing Parenthesis From Renamed Folder
« Reply #60 on: April 06, 2023, 01:12:31 am »

Oops, there was a misplaced comma on the second line, here's the fixed code:
Code: [Select]
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])

Leave the field settings as default. Slashes here are not a concern.
Logged

AudibleImagery

  • World Citizen
  • ***
  • Posts: 108
Re: Remove Hung Closing Parenthesis From Renamed Folder
« Reply #61 on: April 10, 2023, 12:36:02 pm »

Oops, there was a misplaced comma on the second line, here's the fixed code:
Code: [Select]
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])

Leave the field settings as default. Slashes here are not a concern.

Hey Zybex,

I tried this new expression and it's not writing a date or a catalog number to the album folder. I tried different combinations and adjusting the expression but I couldn't get it to work.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2616
Re: Remove Hung Closing Parenthesis From Renamed Folder
« Reply #62 on: April 10, 2023, 01:54:27 pm »

Well, it works for me. I think I can't help any further.
Logged

AudibleImagery

  • World Citizen
  • ***
  • Posts: 108
Re: Remove Hung Closing Parenthesis From Renamed Folder
« Reply #63 on: April 13, 2023, 06:44:19 pm »

Well, it works for me. I think I can't help any further.

Okay, well thank you for your patience and effort.
Logged

AudibleImagery

  • World Citizen
  • ***
  • Posts: 108
Re: Remove Hung Closing Parenthesis From Renamed Folder
« Reply #64 on: May 24, 2023, 06:30:42 pm »

Well, it works for me. I think I can't help any further.

Hey Zybex,

I figured out what is causing one of the older expressions (not the newest one) to not write the catalog number for certain files. If the artist field has an artist in addition to the album artist then it won't write the catalog number to the folder name. Does this tell you anything about what the problem might be with the expression or what a possible fix would be? I'd really appreciate a follow-up on this issue because now I have thousands of album folders that are split into two separate folders.

It's doing this behavior with the following code:
Quote
[Album Artist (auto)]//replace(trim(replace(replace([Album],char(91)Lossychar(93),),char(91)Incompletechar(93),)) char(40)FieldQuery(Artist - Album char(40)yearchar(41),[Artist - Album (year)],Catalog #,1,0)char(41),char(32)char(40)char(41),)
Logged

AudibleImagery

  • World Citizen
  • ***
  • Posts: 108
Re: Remove Hung Closing Parenthesis From Renamed Folder
« Reply #65 on: May 26, 2023, 07:23:30 pm »

Hey Zybex,

I figured out what is causing one of the older expressions (not the newest one) to not write the catalog number for certain files. If the artist field has an artist in addition to the album artist then it won't write the catalog number to the folder name. Does this tell you anything about what the problem might be with the expression or what a possible fix would be? I'd really appreciate a follow-up on this issue because now I have thousands of album folders that are split into two separate folders.

It's doing this behavior with the following code:
Quote
[Album Artist (auto)]//replace(trim(replace(replace([Album],char(91)Lossychar(93),),char(91)Incompletechar(93),)) char(40)FieldQuery(Artist - Album char(40)yearchar(41),[Artist - Album (year)],Catalog #,1,0)char(41),char(32)char(40)char(41),)


Any thoughts?
Logged
Pages: 1 [2]   Go Up