PersonalTagEnhancer (AutoTagging)

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

GuHu
Posts: 63
Joined: Mon Feb 12, 2007 6:25 am
Contact:

Post by GuHu »

Hello everybody,

for everybody who like mostly correct tags this script is a very good help.

I would like Steegy to thank for this script an suggest more which can not implement easily (especially for me :oops: ):

(1) Fix "The" inconsistencies:

"The Beatles", "Beatles", "Beatles, The" => the form you prefer (for me the beatles)

These are found, e.g. from the taggings insonsistencies script

(2) Fix wrong Album artits: often there is album artist equal to the album. A way to clean it would be:

if it is a multi interprets album => put it to "Various"

otherwise to the artist

GuHu
Scimbris
Posts: 19
Joined: Sun Jun 17, 2007 9:29 am
Contact:

Post by Scimbris »

"The" inconsistencies can be added by incorporating in parts of Trixmoto's FixTrailingThe or MakeTrailingThe, according to preference. I hope this isn't considered stealing work.

The following lines would need to be modified: (Adding FixThe)
141 artist = updateCase(FixCommonWords(FixThe(ChangeCharacters(Trim(LCase(itm.ArtistName)))))
146 title = updateCase(FixCommonWords(FixThe(FixBrackets(ChangeCharacters(Trim(LCase(itm.Title)))))))
148 album = updateCase(FixCommonWords(FixThe(FixBrackets(ChangeCharacters(Trim(LCase(itm.AlbumName)))))))
153 artist = updateCase(FixCommonWords(FixThe(ChangeCharacters(Trim(LCase(itm.AlbumArtistName))))))

Then add one of the following blocks of code.

To change "Artist, The" to "The Artist":

Code: Select all

Function FixThe(s) 
   Dim result,txt1,txt2,word,i,wlen 
   result = s 
   Dim theList(3)      'this number must match the largest item number 
	 theList(0) = "The"   'add more lines like this one for more words 
	 theList(1) = "Der"   'the fewer words you have the faster it will process 
	 theList(2) = "Die" 
	 theList(3) = "Das"

   For i=0 to UBound(theList) 
     word = theList(i) 
     wlen = len(word)+2 
     txt1 = UCase(Right(s,wlen)) 
     txt2 = ", "&UCase(word) 
     If txt1 = txt2 Then 
       result = word&" "&Mid(s,1,len(s)-wlen) 
       Exit For 
     End If 
   Next 

   FixThe = result 
End Function 
To change "The Artist" to "Artist, The":

Code: Select all

Function FixThe(s) 
   Dim result,txt1,txt2,word,i,wlen 
   result = s 
   Dim theList(3)      'this number must match the largest item number 
	 theList(0) = "The"   'add more lines like this one for more words 
	 theList(1) = "Der"   'the fewer words you have the faster it will process 
	 theList(2) = "Die" 
	 theList(3) = "Das"

   For i=0 to UBound(theList) 
     word = theList(i) 
     wlen = len(word)+1 
     txt1 = UCase(Left(s,wlen)) 
     txt2 = UCase(word)&" " 
     If txt1 = txt2 Then 
       result = Mid(s,wlen+1)&", "&word 
       Exit For 
     End If 
   Next 

   FixThe = result 
End Function
Image
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm
Contact:

Post by Steegy »

Off course all these scripts could be merged together (and that's how it should be in an ideal situation, as long as the user can choose which script actually will be executed). Incorporated code can be posted here, but it should never be part of the "official script" (as that would be stealing someone else's script).
The only problem with merging script is that the "analysis" will be in one time, but will take longer to complete.

For 2), you can use MediaMonkey's "Maintain Library" to fix Various Artists album artist names. (you can see these inconsistencies in the standard tagging inconsistencies node).
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
GuHu
Posts: 63
Joined: Mon Feb 12, 2007 6:25 am
Contact:

Post by GuHu »

Well, as alread mentioned, tagging rules are very personally. Thus we can discuss some functions, and we can edit the personaltagenhancers fpr the own need.

So I appreciate this suggestions and I think its ok to use fragments from other scripts, if the work of the original author is acknowledged.

@Scimbris

Thanks for your Idea,
this will fixes "Beatles, the" => "the Beatles", unfortunately not
"Beatles" => "the beatles"

GuHu
Diabolic-Destiny
Posts: 223
Joined: Sun Apr 29, 2007 9:45 pm
Contact:

Post by Diabolic-Destiny »

i couldn't find a mention of whether or not this script is compatible with MM3
Image
Image
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

@Scimbris - I do not consider it stealing as long as the worked is stated as mine and not passed off as someone else's.

@GuHu - My "Find Missing The" script handles this so maybe you can incorporate some code from there.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
GuHu
Posts: 63
Joined: Mon Feb 12, 2007 6:25 am
Contact:

Post by GuHu »

trixmoto wrote: @GuHu - My "Find Missing The" script handles this so maybe you can incorporate some code from there.
Thanks a lot, I will adjust my "personal" Personal tag enhancer ..

:)
judas
Posts: 572
Joined: Thu Jun 02, 2005 11:26 pm
Location: Bogotá, Colombia
Contact:

Post by judas »

@steegy or anyone reading...

I've checked the code but cant't seem to find a solution...how can I change the script so ARTIST and ALBUMARTIST are all UPPERCASE? (I'm using the one version that includes the Case Script!)

I tried changing

Code: Select all

artist = updateCase(FixCommonWords(ChangeCharacters(Trim(itm.ArtistName))))
to

Code: Select all

artist = UCase(FixCommonWords(ChangeCharacters(Trim(itm.ArtistName))))
but I get an error when running the updated script...

any ideas?
Cheers, judas
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Well the change you made looks fine. What error message do you get?
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
judas
Posts: 572
Joined: Thu Jun 02, 2005 11:26 pm
Location: Bogotá, Colombia
Contact:

Post by judas »

@trixmoto, thanks for the prompt reply, the message I get after changing the above mentioned lines is:

Code: Select all

There Was a problem querying the database:
Error executing SQL UPDATE Artists SET Artists.Artist = 'SIDESTEPPER' WHERE Artists.Artist = 'SIDESTEPPER'
"near: ".":.syntax error (1,1)
And I have NO idea as to what that means :-)
Cheers, judas
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm
Contact:

Post by Steegy »

In the example code you forgot a closing bracket ).

But I have no idea why the SQL query fails, if the only thing you changed is the case.
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden
Contact:

Post by Bex »

It seems that you can't specify the table again, this should work:

Code: Select all

UPDATE Artists SET Artist = 'SIDESTEPPER' WHERE Artist = 'SIDESTEPPER'
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
judas
Posts: 572
Joined: Thu Jun 02, 2005 11:26 pm
Location: Bogotá, Colombia
Contact:

Post by judas »

Bex wrote:It seems that you can't specify the table again, this should work:

Code: Select all

UPDATE Artists SET Artist = 'SIDESTEPPER' WHERE Artist = 'SIDESTEPPER'
Still lost ¿? :-) Sidestepper is the band, so i still don't know what to change in the script :-)
Cheers, judas
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

If you search the script for "UPDATE Artists SET Artist" you should find the relevant lines of code.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
judas
Posts: 572
Joined: Thu Jun 02, 2005 11:26 pm
Location: Bogotá, Colombia
Contact:

Post by judas »

That works great, thanks a lot trixmoto, bex and (of course) steegy!
Cheers, judas
Post Reply