Page 3 of 8
Posted: Sat Aug 25, 2007 8:33 am
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
):
(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
Posted: Sat Aug 25, 2007 9:21 am
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
Posted: Sat Aug 25, 2007 8:10 pm
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).
Posted: Sun Aug 26, 2007 6:26 am
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
Posted: Mon Aug 27, 2007 5:31 pm
by Diabolic-Destiny
i couldn't find a mention of whether or not this script is compatible with MM3
Posted: Tue Aug 28, 2007 10:03 am
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.
Posted: Sun Sep 02, 2007 2:57 am
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 ..
Posted: Wed Oct 24, 2007 8:00 pm
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?
Posted: Thu Oct 25, 2007 3:17 am
by trixmoto
Well the change you made looks fine. What error message do you get?
Posted: Thu Oct 25, 2007 11:24 am
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
Posted: Thu Oct 25, 2007 1:52 pm
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.
Posted: Thu Oct 25, 2007 3:06 pm
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'
Posted: Thu Oct 25, 2007 4:13 pm
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
Posted: Fri Oct 26, 2007 3:50 am
by trixmoto
If you search the script for "UPDATE Artists SET Artist" you should find the relevant lines of code.
Posted: Fri Oct 26, 2007 10:51 am
by judas
That works great, thanks a lot trixmoto, bex and (of course) steegy!