PersonalTagEnhancer (AutoTagging)

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Postby GuHu » Sat Aug 25, 2007 8:33 am

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
GuHu
 
Posts: 63
Joined: Mon Feb 12, 2007 6:25 am

Postby Scimbris » Sat Aug 25, 2007 9:21 am

"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
Scimbris
 
Posts: 19
Joined: Sun Jun 17, 2007 9:29 am

Postby Steegy » Sat Aug 25, 2007 8:10 pm

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).
Steegy
 
Posts: 3448
Joined: Sat Nov 05, 2005 7:17 pm
Location: Belgium

Postby GuHu » Sun Aug 26, 2007 6:26 am

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
GuHu
 
Posts: 63
Joined: Mon Feb 12, 2007 6:25 am

Postby Diabolic-Destiny » Mon Aug 27, 2007 5:31 pm

i couldn't find a mention of whether or not this script is compatible with MM3
Image
Image
Diabolic-Destiny
 
Posts: 223
Joined: Sun Apr 29, 2007 9:45 pm

Postby trixmoto » Tue Aug 28, 2007 10:03 am

@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.
Check out my scripts at trixmoto.net and subscribe to my RSS feed for updates.
Also check out my Uniface blog.
Get a free Dropbox account! :o

Image
trixmoto
 
Posts: 9703
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK

Postby GuHu » Sun Sep 02, 2007 2:57 am

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

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

Postby judas » Wed Oct 24, 2007 8:00 pm

@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
judas
 
Posts: 572
Joined: Thu Jun 02, 2005 11:26 pm
Location: Bogotá, Colombia

Postby trixmoto » Thu Oct 25, 2007 3:17 am

Well the change you made looks fine. What error message do you get?
Check out my scripts at trixmoto.net and subscribe to my RSS feed for updates.
Also check out my Uniface blog.
Get a free Dropbox account! :o

Image
trixmoto
 
Posts: 9703
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK

Postby judas » Thu Oct 25, 2007 11:24 am

@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
judas
 
Posts: 572
Joined: Thu Jun 02, 2005 11:26 pm
Location: Bogotá, Colombia

Postby Steegy » Thu Oct 25, 2007 1:52 pm

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).
Steegy
 
Posts: 3448
Joined: Sat Nov 05, 2005 7:17 pm
Location: Belgium

Postby Bex » Thu Oct 25, 2007 3:06 pm

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
Bex
 
Posts: 6268
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Postby judas » Thu Oct 25, 2007 4:13 pm

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
judas
 
Posts: 572
Joined: Thu Jun 02, 2005 11:26 pm
Location: Bogotá, Colombia

Postby trixmoto » Fri Oct 26, 2007 3:50 am

If you search the script for "UPDATE Artists SET Artist" you should find the relevant lines of code.
Check out my scripts at trixmoto.net and subscribe to my RSS feed for updates.
Also check out my Uniface blog.
Get a free Dropbox account! :o

Image
trixmoto
 
Posts: 9703
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK

Postby judas » Fri Oct 26, 2007 10:51 am

That works great, thanks a lot trixmoto, bex and (of course) steegy!
Cheers, judas
judas
 
Posts: 572
Joined: Thu Jun 02, 2005 11:26 pm
Location: Bogotá, Colombia

PreviousNext

Return to Need Help with Addons?

Who is online

Users browsing this forum: No registered users and 24 guests