Script Request: Album Art Extractor to Overwrite WMPAlbumArt
Sorry, I was trying something which didn't work and didn't fully undo it. Try downloading it again and use the mask "<path>\Folder".
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: 46
- Joined: Tue Apr 04, 2006 3:05 pm
Ok, closer...but unless I manually delete the Folder.jpg file first, the script errors out. Here's what it's set to do:trixmoto wrote:Sorry, I was trying something which didn't work and didn't fully undo it. Try downloading it again and use the mask "<path>\Folder".
Mask: <path>\Folder
Key: Will be created - Duplicate - File already exists
These images will overwrite existing files.
Extracted images will be marked as hidden.
Then it gives an error saying that \Folder.jpg could not be created. The 240 x 240 JPG file becomes un-hidden by the script, but then not overwritten...
These settings work correctly for me, overwriting a 240x240 hidden "Folder.jpg" withh a 200x200 version (also hidden).
If you open the scriptfile in a text editor you'll find lines 766-769 are...
Could you please change this to be...
So that I can see which line the error is.
If you open the scriptfile in a text editor you'll find lines 766-769 are...
Code: Select all
MsgBox "Error: File '"&gettrackart&"' could not be created."
End If
Else
MsgBox "Error: File '"&gettrackart&"' could not be created."
Code: Select all
MsgBox "Error: File '"&gettrackart&"' could not be created (766)."
End If
Else
MsgBox "Error: File '"&gettrackart&"' could not be created (769)."
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: 46
- Joined: Tue Apr 04, 2006 3:05 pm
I performed the edits as you requested, but I'm not getting a helpful error. Here's what I'm doing:trixmoto wrote:If you open the scriptfile in a text editor you'll find lines 766-769 are...
Mask: <path>\Folder
Key: Will be created - Duplicate - File already exists
These images will overwrite existing files.
Extracted images will be marked as hidden.
# Track Files to create
1 (SoCal VoCals) - Underground.mp3 M:\Music\A Capella\SoCal VoCals - SoCal VoCals\Folder.jpg
The error just says that the Folder.jpg could not be created. There's no number or code line anywhere in the error.
I must have done something wrong with the edit. You can download the VBS file here:
http://www.jasondunn.com/upload/
Thanks for your continued patience in working with me to find a solution to this.

Sorry, similar error messages appear on line 736 and 739 - could you make similar changes to these and try again?
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: 46
- Joined: Tue Apr 04, 2006 3:05 pm
Ok, I made the changes and it says the error is happening on line 769.trixmoto wrote:Sorry, similar error messages appear on line 736 and 739 - could you make similar changes to these and try again?
I uploaded the new VB file if you want to take a look at it and confirm I made the right changes.
Thanks!

Did you change the messages to give the line numbers or did you just copy and paste again? You haven't uploaded the file so I can't see.
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: 46
- Joined: Tue Apr 04, 2006 3:05 pm
I'm editing this in Notepad, and quite franky as a non-coder I don't really know exactly what I'm doing nor exactly what you're asking me to do.trixmoto wrote:Did you change the messages to give the line numbers or did you just copy and paste again? You haven't uploaded the file so I can't see.


You have edited the script correctly, but I can't work our why your path is not appearing. Can you tell me the full path of the track that gives you this error?
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: 46
- Joined: Tue Apr 04, 2006 3:05 pm
All the info:trixmoto wrote:You have edited the script correctly, but I can't work our why your path is not appearing. Can you tell me the full path of the track that gives you this error?
1. Extract artwork (copy from tag to mask)
Mask: <path>\Folder
Key: Will be created - Duplicate - File already exists
These images will overwrite existing files.
Extracted images will be marked as hidden.
# Track Files to create
1 (Boxtree) - Where Can I Go.mp3 M:\Music\Christian Pop\Boxtree - Sitting Still\Folder.jpg
The error I just got references line 766.
-
- Posts: 46
- Joined: Tue Apr 04, 2006 3:05 pm
I looked at the script and figured out the problem. WMP marks the album art with the Hidden AND System attributes.
Your script only clears the Hidden attribute. That is why it can't overwrite the file.
I've modified the script to first clear all attributes (saving the current attributes to a variable), then after writing out the image, I restore the original attributes.
Here's the sections I changed:
In getalbumart()
Changed and added these functions
Your script only clears the Hidden attribute. That is why it can't overwrite the file.
I've modified the script to first clear all attributes (saving the current attributes to a variable), then after writing out the image, I restore the original attributes.
Here's the sections I changed:
In getalbumart()
Code: Select all
Else
loc = "#ff0000" 'red
If Overwrite = 1 Then
chk = True
Artwork.Item(gettrackart) = "done"
If boo Then
Dim oldAttributes
oldAttributes = SetNormal(gettrackart)
Set out = SDB.Tools.FileSystem.CreateTextFile(gettrackart,True)
If Not (out Is Nothing) Then
Call out.WriteData(jpg.ImageData,jpg.ImageDataLen)
out.Close
Call RestoreAttributes(gettrackart, oldAttributes)
Else
MsgBox "Error: File '"&gettrackart&"' could not be created."
End If
End If
End If
End If
Code: Select all
Function SetNormal(pFilePath)
Dim f : Set f = fso.GetFile(pFilePath)
SetNormal = f.Attributes ' Return original attributes
f.Attributes = 0
End Function
Function RestoreAttributes(pFilePath, pAttributes)
Dim f : Set f = fso.GetFile(pFilePath)
f.Attributes = pAttributes
RestoreAttributes = True
End Function
-
- Posts: 46
- Joined: Tue Apr 04, 2006 3:05 pm
You can download it from here:
http://www.systemex.net/files/mediamonk ... er_mod.zip
NOTE: Hopefully trixmoto will update his official version with the fix. When he does, I recommend you use that version.
Good luck!
http://www.systemex.net/files/mediamonk ... er_mod.zip
NOTE: Hopefully trixmoto will update his official version with the fix. When he does, I recommend you use that version.
Good luck!
-
- Posts: 46
- Joined: Tue Apr 04, 2006 3:05 pm
That worked! Everything works the way it should now. Excellent!
I'm looking at the output, and it looks decent, but even at 90% quality there's some JPEG artifacting going on. Trixmoto, this is a long shot, but have you ever thought about having a direct JPEG extraction from the tag, without a resize or a re-save? As in, my embedded tags are already 600 x 600, and that's exactly the size I want as my Folder.jpg file. Would that be possible?

I'm looking at the output, and it looks decent, but even at 90% quality there's some JPEG artifacting going on. Trixmoto, this is a long shot, but have you ever thought about having a direct JPEG extraction from the tag, without a resize or a re-save? As in, my embedded tags are already 600 x 600, and that's exactly the size I want as my Folder.jpg file. Would that be possible?