Album Art Tagger 5.2 - Updated 26/10/2013
I'm glad you like the script!
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.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Hello trixmoto,
I just finished the task of scanning my 993 CD covers. I could only work on weekends and only when my family gave me the time, so it took me about 8 weeks. My wife says if I will touch all those CDs once more, she will be leaving... =6^)
Now I wanted to use your nice script to embed the art into my tags.
But since I am using the mask <artist> - <album>, sometimes I have problems as your script does not exchange several special characters.
Now to copy MMs behavior when renaming filenames, I changed a function of your script a little.
Maybe you want to adopt the change, it is rather useful. Here it is:
Thanx once more for your wonderful scripts. They make using MM even more fun.
bye
Wolfgang
I just finished the task of scanning my 993 CD covers. I could only work on weekends and only when my family gave me the time, so it took me about 8 weeks. My wife says if I will touch all those CDs once more, she will be leaving... =6^)
Now I wanted to use your nice script to embed the art into my tags.
But since I am using the mask <artist> - <album>, sometimes I have problems as your script does not exchange several special characters.
Now to copy MMs behavior when renaming filenames, I changed a function of your script a little.
Maybe you want to adopt the change, it is rather useful. Here it is:
Code: Select all
Function puttrackart(itm,boo)
Dim upd : upd = False
Dim first : first = True
Dim path : path = FileMask
path = Replace(path,"<path>",Mid(itm.Path,1,InStrRev(itm.Path,"\")-1))
If (itm.AlbumArtistName = "") Then
path = Replace(path,"<artist>",itm.ArtistName)
Else
path = Replace(path,"<artist>",itm.AlbumArtistName)
End If
If (itm.AlbumName = "") Then
path = Replace(path,"<album>",itm.Title)
Else
path = Replace(path,"<album>",itm.AlbumName)
End If
Dim name : name = Mid(itm.Path,InStrRev(itm.Path,"\"))
name = Mid(name,2,InStrRev(name,".")-2)
path = Replace(path,"<file>",name)
path = Replace(path,"<#>",Progress.Value+1)
path = Replace(path,"?","")
path = Replace(path,"!","")
path = Left(path,2)+ Replace(path,":","-",3)
path = Replace(path,"/","-")
path = Replace(path,"""","'")
bye
Wolfgang
It is on my to do list to correct the image filename using the standard MM call, this will mean it will work whatever your character replacement settings are.
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.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Error
When I try to extract art from tags to folder.jpg
I get " error # 424 microsoft vbscript runtime error
object required 'out"
file .... albumarttagger.vbs, line 594, column 14"
after click OK
"object required 'out"
Seems like it worked before. Hmmm. Tried to reinstall with same results.
thanks for all the great scripts trixmoto
I get " error # 424 microsoft vbscript runtime error
object required 'out"
file .... albumarttagger.vbs, line 594, column 14"
after click OK
"object required 'out"
Seems like it worked before. Hmmm. Tried to reinstall with same results.
thanks for all the great scripts trixmoto
If you open the script file in a text editor, lines 593-594 should be...
Please insert the following line between them, to give you...
Then when you run the script you should get a filename put up in a message, what is the filename?
Code: Select all
Set out = SDB.Tools.FileSystem.CreateTextFile(gettrackart,True)
out.WriteData jpg.ImageData,jpg.ImageDataLen
Code: Select all
Set out = SDB.Tools.FileSystem.CreateTextFile(gettrackart,True)
If out Is Nothing Then MsgBox gettrackart
out.WriteData jpg.ImageData,jpg.ImageDataLen
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.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Well that's the problem then, you haven't specified a path! If you want the image to appear in the album folder then you mask should be "<path>\folder.jpg", otherwise you need to specify a common folder in the mask itself.
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.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
I'm not sure why you'd want to do this, but I've put it on my to do list for the next version.
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.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Whew! has this script helped me clean things up! Thanks!
Any chance of adding the ItemType to image filename mask options?
I have many albums with front_cover, back_cover, etc.
Ideally I'd like to save that info when extracting, and be able to restore/add it when tagging (while keeping track of the tag order too, of course).
I currently have an inelegant system of folder.jpg, back.jpg, cover2.jpg, pg1.jpg, etc
I can see alot of room for trouble trying to implement this with <album> but I'd be happy using a fixed name like "folder" and something like a trailing -nn
e.g.:
folder.jpg = first art, front cover (item type not present- defaults to type3)
folder_2-4.jpg = second art, back cover
folder_3.jpg = third art, front cover
folder_4-3.jpg = 4th art, yet another front cover
etc
anyway - I don't know if there's enough interest in the idea ...
Any chance of adding the ItemType to image filename mask options?
I have many albums with front_cover, back_cover, etc.
Ideally I'd like to save that info when extracting, and be able to restore/add it when tagging (while keeping track of the tag order too, of course).
I currently have an inelegant system of folder.jpg, back.jpg, cover2.jpg, pg1.jpg, etc
I can see alot of room for trouble trying to implement this with <album> but I'd be happy using a fixed name like "folder" and something like a trailing -nn
e.g.:
folder.jpg = first art, front cover (item type not present- defaults to type3)
folder_2-4.jpg = second art, back cover
folder_3.jpg = third art, front cover
folder_4-3.jpg = 4th art, yet another front cover
etc
anyway - I don't know if there's enough interest in the idea ...
Continuing from my earlier post ...
I had a chance to mull it over some more and look at your script and came up with a couple of ideas:
1) Give the choice of extracting all or just the first piece of art - use the <*> mask - currently ignored on extract.
Added to Function gettrackart:
and changed the For:
2) Tracking image type:
I finally concluded it makes the most sense to append the image type as a suffix after the image number suffix. Also that the first/only image should be considered a front_cover (unless specifically typed otherwise) and thus doesn't need a type suffix. This preserves your current number system and compatibility with "folder.jpg" art.
So - adding a mask option of <type> and a function SpellType to convert types from numbers to words and back --
Extracting the image type to the image file name:
Changed the deepest If in Function gettrackart which completes the file name:
Embedding/linking art:
Added to Function Puttrackart:
And changed "img.ItemType = 3" and "img2.ItemType = 3" to:
Finally, the SpellType function which hard codes stuff that really ought to be in the ini file 'cause
I just did it to my taste, needs, & language:
If these ideas are of general interest maybe they could make it into your next release ... thanks again for a wonderfully useful script.
I had a chance to mull it over some more and look at your script and came up with a couple of ideas:
1) Give the choice of extracting all or just the first piece of art - use the <*> mask - currently ignored on extract.
Added to Function gettrackart:
Code: Select all
Dim picscount
If InStr(FileMask,"<*>")>0 Then
picscount = pics.Count-1
Else
picscount=0
End If
Code: Select all
For i = 0 To picscount
2) Tracking image type:
I finally concluded it makes the most sense to append the image type as a suffix after the image number suffix. Also that the first/only image should be considered a front_cover (unless specifically typed otherwise) and thus doesn't need a type suffix. This preserves your current number system and compatibility with "folder.jpg" art.
So - adding a mask option of <type> and a function SpellType to convert types from numbers to words and back --
Extracting the image type to the image file name:
Changed the deepest If in Function gettrackart which completes the file name:
Code: Select all
If InStr(gettrackart,"<type>") > 0 Then
gettrackart = Replace(gettrackart,"<type>","")
If (i = 0) and (pics.Item(i).ItemType=0 or pics.Item(i).ItemType=3) Then
gettrackart = gettrackart&".jpg"
Else
gettrackart = gettrackart&"_"&(i+1)&"-"&SpellType(pics.Item(i).ItemType,True,False)&".jpg"
End If
Else
If (i = 0) Then
gettrackart = gettrackart&".jpg"
Else
gettrackart = gettrackart&"_"&(i+1)&".jpg"
End If
End If
Embedding/linking art:
Added to Function Puttrackart:
Code: Select all
Dim puttype : puttype = False
If InStr(path,"<type>") > 0 Then
path = Replace(path,"<type>","")
puttype = True
End If
Code: Select all
If puttype and InStrRev(puttrackart,"-")>0 Then
img.ItemType = SpellType(Mid(puttrackart,InStrRev(puttrackart,"-")+1,InStrRev(puttrackart,".")-InStrRev(puttrackart,"-")-1),False,first)
Else
img.ItemType=SpellType("",False,first)
End If
first = False
Code: Select all
If puttype and InStrRev(puttrackart,"-")>0 Then
img2.ItemType = SpellType(Mid(puttrackart,InStrRev(puttrackart,"-")+1,InStrRev(puttrackart,".")-InStrRev(puttrackart,"-")-1),False,first)
Else
img2.ItemType=SpellType("",False,first)
End If
first = False
Finally, the SpellType function which hard codes stuff that really ought to be in the ini file 'cause
I just did it to my taste, needs, & language:
Code: Select all
Function SpellType(imgtype,boo,boo1st)
If boo Then
Select Case imgtype
Case 3
SpellType="Front"
Case 4
SpellType="Back"
Case 5
SpellType="Inside"
Case 6
SpellType="CD"
Case Else
SpellType=imgtype
End Select
Else
Select Case LCase(imgtype)
Case "front"
SpellType=3
Case "back"
SpellType=4
Case "inside"
SpellType=5
Case "cd"
SpellType=6
Case Else
If InStr(LCase(imgtype),"cover")>0 Then
SpellType=3
Else
If InStr(LCase(imgtype),"page")>0 or InStr(LCase(imgtype),"pg")>0 Then
SpellType=5
Else
If InStr(LCase(imgtype),"label")>0 Then
SpellType=6
Else
If boo1st Then
SpellType=3
Else
SpellType=0
End If
End If
End If
End If
End Select
End If
End Function
I will have a look at these suggestions and see about implementing them in the next version. Thanks for taking the time to think about these issues.
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.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
-
- Posts: 4
- Joined: Sat Jan 06, 2007 1:27 am
@juggernott - this is posted in the wrong thread!
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.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.