RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Post by ZvezdanD »

There is a problem with some fields used with presets that change both fields, source and destination, i.e. Into and From. Here is the list of those fields:
- Date [MM3+]
- Original Date [MM3+]
- Folder
- Filename
- Extension
- Playback %
- Type [MM4]

Those are complex fields that are not represented by SongData MM interface, but they are based on the existing ones. The Date is based on Year, Month and Day; The Folder, Filename and Extension are based on Path, and so on.

Those fields could be used with presets that change only destination (Into) field. I will look at this problem, but I doubt I could do anything about it.

If you have only year part of that field used, you could try to swap Year with Original Year.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
carkey151
Posts: 24
Joined: Fri Jan 22, 2010 9:14 am

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Post by carkey151 »

Could you please show me what the original Preset 4 (Remove specified string from <Into Field) is supposed to be in the Mediamonkey.ini? I somehow screwed this up and have no "Source Field", only the "Destination Field" or can I fix this in another way?
martialartsguy
Posts: 312
Joined: Mon Apr 03, 2006 9:11 am
Location: Denver, CO

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Post by martialartsguy »

carkey151 wrote: Tue Aug 04, 2020 9:12 am Could you please show me what the original Preset 4 (Remove specified string from <Into Field) is supposed to be in the Mediamonkey.ini? I somehow screwed this up and have no "Source Field", only the "Destination Field" or can I fix this in another way?
Here's a screenshot of the fields in the script itself:
https://imgur.com/EvjRke1
MM Gold since 2006
carkey151
Posts: 24
Joined: Fri Jan 22, 2010 9:14 am

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Post by carkey151 »

Thank you, Problem solved
wdp
Posts: 42
Joined: Sun Jun 02, 2019 1:28 pm

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Post by wdp »

I am brand new to MM. I have just imported my Itunes library and I am trying to use this excellent addon to erase the Itunes comments in the comment field. There is a preset for that but I can't seem to figure out how to get it to work. I have used the addon to help with another issue but for some reason I can't figure this one out. Any advice appreciated.
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Post by ZvezdanD »

wdp wrote: Fri Nov 20, 2020 12:42 am I am trying to use this excellent addon to erase the Itunes comments in the comment field. There is a preset for that but I can't seem to figure out how to get it to work.
Please post the screenshot of the Preset Settings dialog box with the mentioned preset selected and visible any track having the iTunes info in the Comment field. You could also copy/paste the Comment field of any track containing that info here.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
wdp
Posts: 42
Joined: Sun Jun 02, 2019 1:28 pm

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Post by wdp »

ZvezdanD wrote: Fri Nov 20, 2020 3:53 am
wdp wrote: Fri Nov 20, 2020 12:42 am I am trying to use this excellent addon to erase the Itunes comments in the comment field. There is a preset for that but I can't seem to figure out how to get it to work.
Please post the screenshot of the Preset Settings dialog box with the mentioned preset selected and visible any track having the iTunes info in the Comment field. You could also copy/paste the Comment field of any track containing that info here.
Here it is:

https://ibb.co/zm2WX4R
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Post by ZvezdanD »

It would be nice if you copy/paste Comment field of several tracks with the iTunes info so that I can observe the pattern. I don't have tracks with such info in them to conclude that. Do all your tracks have "0x" on the beginning of the Comment? iTunes uses COMMENT:ITUNNORM for gain control and COMMENT:ITUNSMPB for seamless playback and it seems that your track contains ITUNSMPB tag, but none example that I found on Internet has "0x" on its beginning. Anyway, you could try the next Find what string, it should remove both tags:

Code: Select all

(0x)?(([0-9A-F]{8} ){3}[0-9A-F]{16}( [0-9A-F]{8}){8}|([0-9A-F]{8} ){9}[0-9A-F]{8})\s*
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
wdp
Posts: 42
Joined: Sun Jun 02, 2019 1:28 pm

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Post by wdp »

ZvezdanD wrote: Fri Nov 20, 2020 4:28 pm It would be nice if you copy/paste Comment field of several tracks with the iTunes info so that I can observe the pattern. I don't have tracks with such info in them to conclude that. Do all your tracks have "0x" on the beginning of the Comment? iTunes uses COMMENT:ITUNNORM for gain control and COMMENT:ITUNSMPB for seamless playback and it seems that your track contains ITUNSMPB tag, but none example that I found on Internet has "0x" on its beginning. Anyway, you could try the next Find what string, it should remove both tags:

Code: Select all

(0x)?(([0-9A-F]{8} ){3}[0-9A-F]{16}( [0-9A-F]{8}){8}|([0-9A-F]{8} ){9}[0-9A-F]{8})\s*
So helpful - thank you. That cleaned up most of it. However, in many fields I have a "|" character left in the comment field. It is in purple color. I can't delete it. When I try to edit the record it shows nothing in the comment field to delete. Any idea? Two screen shots attached.

https://ibb.co/Rp6RGHq
https://ibb.co/S0CBxH2
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Post by ZvezdanD »

wdp wrote: Fri Nov 20, 2020 9:48 pm That cleaned up most of it. However, in many fields I have a "|" character left in the comment field.
Did you notice any rule with which comments in tracks you got this "|" character? Did you notice anything strange in the table of the Preset Settings dialog with such files before applying the preset? Could you post the Comment field of such tracks with the iTunes info before applying this preset, so that I can observe the pattern between them?
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
wdp
Posts: 42
Joined: Sun Jun 02, 2019 1:28 pm

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Post by wdp »

ZvezdanD wrote: Sat Nov 21, 2020 1:29 am Did you notice anything strange in the table of the Preset Settings dialog with such files before applying the preset? Could you post the Comment field of such tracks with the iTunes info before applying this preset, so that I can observe the pattern between them?
I did not notice anything strange in the preset. I can't see the iTunes info before apply this preset. I think we have done as good as we can and it cleaned up a lot. Apparently these were Hex characters used by iTunes. I don't know what the "|" is. It is weird that is shows when viewed as a list but doesn't show when the song is edited. And it is weird that it is a different color. Thanks for the help.
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Post by ZvezdanD »

wdp wrote: Sun Nov 22, 2020 9:11 am I can't see the iTunes info before apply this preset.
Yes, you can. It is visible as Hex characters in the Comment field on your first screenshot. I suppose that you got that "|" thing with tracks having an empty line before ITUNNORM and/or ITUNSMPB tag in the Comment, but I cannot be sure until I see the original content of your Comment field. Please post any source sample of the Comment that results with the "|", so that I could improve the preset.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
wdp
Posts: 42
Joined: Sun Jun 02, 2019 1:28 pm

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Post by wdp »

ZvezdanD wrote: Sun Nov 22, 2020 1:50 pm Yes, you can. It is visible as Hex characters in the Comment field on your first screenshot. I suppose that you got that "|" thing with tracks having an empty line before ITUNNORM and/or ITUNSMPB tag in the Comment, but I cannot be sure until I see the original content of your Comment field. Please post any source sample of the Comment that results with the "|", so that I could improve the preset.
Here are the first 3 from the screenshot you reference. That screen shot are from the MM database. These are from the iTunes database using iTunes to screen shot:

https://ibb.co/phBS2YG
https://ibb.co/m0jR8Zs
https://ibb.co/dBp1jZW
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Post by ZvezdanD »

wdp wrote: Sun Nov 22, 2020 9:32 pm Here are the first 3 from the screenshot you reference. That screen shot are from the MM database. These are from the iTunes database using iTunes to screen shot:
The screenshot from iTunes is not referent, because its Comment field could differ from the MM Comment field. The first screenshot made in MM shows "0x" on the beginning of the string, while the tracks in iTunes don't have it. Do all your tracks having the iTunes info contain the "0x" in MM on the beginning?

When I said copy/paste the Comment field, I meant that you open the problematic tracks (that cause the "|") in the Properties dialog in MediaMonkey, copy the Comment field as text and paste it here in the post.

Did you notice an empty line on the beginning of the Comment field in tracks that result having the "|" after applying the preset? Could you try the next preset on such tracks:

Code: Select all

[\s\n]*(0x)?(([0-9A-F]{8} ){3}[0-9A-F]{16}( [0-9A-F]{8}){8}|([0-9A-F]{8} ){9}[0-9A-F]{8})[\s\n]*
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
wdp
Posts: 42
Joined: Sun Jun 02, 2019 1:28 pm

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Post by wdp »

ZvezdanD wrote: Mon Nov 23, 2020 1:40 am
When I said copy/paste the Comment field, I meant that you open the problematic tracks (that cause the "|") in the Properties dialog in MediaMonkey, copy the Comment field as text and paste it here in the post.

Did you notice an empty line on the beginning of the Comment field in tracks that result having the "|" after applying the preset? Could you try the next preset on such tracks:

Code: Select all

[\s\n]*(0x)?(([0-9A-F]{8} ){3}[0-9A-F]{16}( [0-9A-F]{8}){8}|([0-9A-F]{8} ){9}[0-9A-F]{8})[\s\n]*
Ah. OK. No. The "0x" was my first attempt at using the addon. I was seeing what happened if I had the addon just write an "x" in the comment field. As a matter of fact, if I backspace over the comment field all the way to the top, the "|" vertical line goes away.

There is nothing to paste but there is an extra line. Look at the screen shot. You can see where the cursor is.

EDIT: Well it looks like I have clear my Database and reimport to get the iTunes data/tags. I am missing about half of them. So.... I cleaned the comment field in iTunes. When I re-import it should no longer be an issue.

https://ibb.co/fq0c0Tc
Post Reply