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

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

ZvezdanD
Posts: 3141
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: Mon Nov 23, 2020 12:45 pm There is nothing to paste but there is an extra line.
I told you, I wanted that you copy/paste the Comment field as it was "before applying the preset" when it still "contained iTunes info". I wanted the original sample to see how it looks like and to try to reproduce the problem with it, but I cannot do that with what you got as the result of the preset. You confused me with that "0x" thing and an extra empty line on the beginning of the Comment, when in fact it was you who added that to the existing iTunes info. Anyway, I am glad that you don't have issues any more.
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: 39
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 just don't know how to do that. I have converted the field so I can't show you what it was before I converted it. So I tried to show what is in the iTunes database. I didn't point MM to that database. I pointed it to a copy of that database and it has now been converted using the find and replace addon.

I did not insert the extra line. I inserted an X in one record as I was using the addon. As it didn't yield a good outcome, I didn't do that again. Following your direction, I was able to ascertain that your theory was correct. There is an extra line.
cokehearth
Posts: 38
Joined: Thu Aug 24, 2017 6:13 am

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

Post by cokehearth »

I've been driving myself a little mad trying to figure this out and I can't find anything in the search (perhaps I'm not searching the right thing); so I wonder if those well-versed in this stuff can help me.

Is there a way to alphabetise the artists field? I currently have them stored with ";" separators.

e.g.: "Bomb the Bass; Sinéad O'Connor; Benjamin Zephaniah".

But I would want to be able to alphabetise that field, so it would appear:

"Benjamin Zephaniah; Bomb The Bass; Sineád O'Connor".

The closest I managed to find here was:

Code: Select all

SQLQuery("SELECT group_concat(AA, '; ') FROM (SELECT DISTINCT Artists.Artist AS AA FROM Songs INNER JOIN ArtistsSongs ON Songs.ID = ArtistsSongs.IDSong AND (ArtistsSongs.PersonType = 1 OR ArtistsSongs.PersonType IS NULL) INNER JOIN Artists ON ArtistsSongs.IDArtist = Artists.ID WHERE IDAlbum = " & oSongData.Album.ID & ")")
- But that gets ALL of the artist values for the ENTIRE album the track is on, rather than just that one track on its own and nothing I seem to change will make it just fetch the artists for that ONE song, rather than ALL the artists featured on the album for which the song appears.

Many thanks,
cokehearth
ZvezdanD
Posts: 3141
Joined: Thu Jun 08, 2006 7:40 pm

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

Post by ZvezdanD »

cokehearth wrote: Fri Dec 04, 2020 4:53 am Is there a way to alphabetise the artists field?
Maybe you could try this:

Code: Select all

SQLQuery("SELECT group_concat(AA, '; ') FROM (SELECT DISTINCT Artists.Artist AS AA FROM Songs INNER JOIN ArtistsSongs ON Songs.ID = ArtistsSongs.IDSong AND (ArtistsSongs.PersonType = 1 OR ArtistsSongs.PersonType IS NULL) INNER JOIN Artists ON ArtistsSongs.IDArtist = Artists.ID WHERE Songs.ID = " & oSongData.ID & ")")
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
cokehearth
Posts: 38
Joined: Thu Aug 24, 2017 6:13 am

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

Post by cokehearth »

ZvezdanD wrote: Fri Dec 04, 2020 3:57 pm
cokehearth wrote: Fri Dec 04, 2020 4:53 am Is there a way to alphabetise the artists field?
Maybe you could try this:

Code: Select all

SQLQuery("SELECT group_concat(AA, '; ') FROM (SELECT DISTINCT Artists.Artist AS AA FROM Songs INNER JOIN ArtistsSongs ON Songs.ID = ArtistsSongs.IDSong AND (ArtistsSongs.PersonType = 1 OR ArtistsSongs.PersonType IS NULL) INNER JOIN Artists ON ArtistsSongs.IDArtist = Artists.ID WHERE Songs.ID = " & oSongData.ID & ")")
It appears to work! Thank you VERY much for that, you've made my music collection work a lot better.

It really is genuinely appreciated!
Boobounder
Posts: 29
Joined: Wed May 14, 2008 9:49 pm

Merge 2 Tags for Songs

Post by Boobounder »

Can't believe I can't figure this out or find a simple script ...

How do I prepend the disc # on to the track #?

For example, I have a bunch of songs with disc # set to 2, and track #'s running 01, 02, 03 ...

I want to keep the disc # tag as is, and change the track # tags to 201, 202, 203 ...
Lowlander
Posts: 49268
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Merge 2 Tags for Songs

Post by Lowlander »

RegExp should be able to do this: viewtopic.php?f=2&t=28510&hilit=regexp
Lowlander (MediaMonkey user since 2003)
Boobounder
Posts: 29
Joined: Wed May 14, 2008 9:49 pm

Re: Merge 2 Tags for Songs

Post by Boobounder »

Ooooooh. Don't say that.

I just spent an hour trying to figure out the interface of that script, and I got nowhere. And I use things like that all the time, and I'm pretty good with regex.

Is there a tutorial out there somewhere?
ZvezdanD
Posts: 3141
Joined: Thu Jun 08, 2006 7:40 pm

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

Post by ZvezdanD »

If you have any constructive suggestion how the user interface could be improved to be easier and more intuitive, but keeping the same level of flexibility and functionality, I will definitely consider it. It is easy to criticize someone's hard work, being creative is much harder.

The tutorial for the add-on could be found in the Usage section on the very same web page from which you downloaded the add-on. You could get that page loaded in your default web browser if you click the version number of the add-on displayed in the top-right corner of its Options dialog box.
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
achimv
Posts: 8
Joined: Sat Jan 16, 2021 7:24 am

album artist not showing

Post by achimv »

Hello, I have scanned my files and see like 500 albums with "unknown" album artists in art view, although the artist field is correct. I have downloaded REGEXP but this does not help: I want the artist tag copied into the album artist field only if "unknown" in shown in the album artist field. Don't want to use the function manually on 500 albums. Please advise how to change automatically, thank you
ZvezdanD
Posts: 3141
Joined: Thu Jun 08, 2006 7:40 pm

Re: album artist not showing

Post by ZvezdanD »

achimv wrote: Sat Jan 16, 2021 7:37 am I want the artist tag copied into the album artist field only if "unknown" in shown in the album artist field.
By "unknown" you mean empty, right? Did you try the predefined preset "Copy <From Field> to <Into Field> only if it is empty..."?
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
achimv
Posts: 8
Joined: Sat Jan 16, 2021 7:24 am

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

Post by achimv »

no, not empty , I have seen that RegExp rule. It is written "unknown" in the field, that is not empty, right?
achimv
Posts: 8
Joined: Sat Jan 16, 2021 7:24 am

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

Post by achimv »

OK, this works on a single album, great! But how can I apply this o all 500 albums with the same problem? I tried o mark them all, but does not work. If I use function from EDIT-Menu, nothing happens....
achimv
Posts: 8
Joined: Sat Jan 16, 2021 7:24 am

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

Post by achimv »

works fine now, thanks!
Post Reply