IUs there a way to auto-change "and" to "&

Get answers about using MediaMonkey 4 for Windows.

Moderator: Gurus

latinmusiclover
Posts: 183
Joined: Tue Feb 27, 2007 11:31 pm

IUs there a way to auto-change "and" to "&

Post by latinmusiclover »

I have a lot of Tagging Inconsistencies where "and" and "&" appear for the artist, so many that I want to auto change them all from 'and' to "&" and be done with it. Any ideas? I thought of Personal Tag Enhancer, but don't have a clue how to program it and don't want to wreck anything. Also, I want to add "The" in front of some artists to get rid of the "The" inconsistencies automatically.

I would run this filter through once, select the files, run a script that changes them, and then remove the script. I only want it to act on the Artist and Album Artist fields.
judas
Posts: 572
Joined: Thu Jun 02, 2005 11:26 pm
Location: Bogotá, Colombia

Post by judas »

you should search the scripts forum...theres a tagging inconsistencies and a search and replace script lying around somewhere, and they both should take care of your & problem,..as for the The, there is also a find missing the script, just do a search!
Cheers, judas
nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

Post by nohitter151 »

MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?

Please no PMs in reply to a post. Just reply in the thread.
latinmusiclover
Posts: 183
Joined: Tue Feb 27, 2007 11:31 pm

Post by latinmusiclover »

I was able to do all the "The" ones with the FindMissingThe script, but I can't figure out whether the "Search and Replace" script is safe to use. I read the thread, read the code, and it seems to do a lot of stuff that I don't' need. I don't' want to risk damaging my nearly complete database by using something that hasn't been tested.

I have Personal Tag Enhancer and trust it. Does anyone know if that could handle the "and" to "&" replacements I need. Tagging Inconsistencies can find the tracks for me, so all I need is to replace "and' with"&" for the files I select.
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Post by Steegy »

In Personal Tag Enhancer, you can add e.g.

Code: Select all

Tag = ReplaceBadTagPortion(Tag, "and", "&")
to the FixCommonWords function. This will replace all occurences of "and" that are not part of a word, by &.
A and B --> A & B
Band --> Band
Abba (and Beer) --> Abba (& Beer)



You can also add e.g.

Code: Select all

Tag = Replace(Tag, " and ", " & ", 1, -1, 1)
to the ChangeCharacters function. This will replace all occurences of "and" that are lead and followed by a space, by &.
A and B --> A & B
Band --> Band
Abba (and Beer) --> Abba (and Beer)



So it depends on what you want.
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
latinmusiclover
Posts: 183
Joined: Tue Feb 27, 2007 11:31 pm

Post by latinmusiclover »

Steegy wrote:In Personal Tag Enhancer, you can add e.g.

Code: Select all

Tag = ReplaceBadTagPortion(Tag, "and", "&")
to the FixCommonWords function. This will replace all occurences of "and" that are not part of a word, by &.
A and B --> A & B
Band --> Band
Abba (and Beer) --> Abba (& Beer)


You can also add e.g.

Code: Select all

Tag = Replace(Tag, " and ", " & ", 1, -1, 1)
to the ChangeCharacters function. This will replace all occurences of "and" that are lead and followed by a space, by &.
A and B --> A & B
Band --> Band
Abba (and Beer) --> Abba (and Beer)
I chose the latter because in the Artist an "and" always has a space before and after. This was to reduce the chance of changing a legitimate "and". Is there a way to make sure that these changes only occur to the Artist and AlbumArtist fields so as to avoid "& I Love Her so" as a Title?
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Post by Steegy »

so as to avoid "& I Love Her so" as a Title
As you replace " and " (and not "and ") that won't happen anyway (or the title would have to start with a space).
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Post Reply