Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Album Art Downloader XUI (Read 2022843 times) previous topic - next topic
0 Members and 6 Guests are viewing this topic.

Album Art Downloader XUI

Reply #2225
Quote
theorchard.boo(6,7): error BCE0132: The namespace '' already contains a definition for 'Ioda'.

Ioda changed their name to The Orchard, so you should really only have one of those scripts installed. theorchard.boo replaces ioda.boo, which no longer works. If you still have ioda.boo, then I'd recommend deleting it. Changing the name of the class from Ioda to Orchard as iammike did is harmless, but unnecessary if you've deleted ioda.boo.

Alex

Album Art Downloader XUI

Reply #2226
Hi Alex,
Two more script suggestions for classical music lovers:

http://www.theclassicalshop.net
has high resolution cover art for every album on their website. I'm not used to the search algotithm but maybe you can figure it out.

http://www.hyperion-records.co.uk
is a large british record label for classical music. You'll find High Resolution Album Art for their whole catalogue on their website.

Once more, thanks for your great program. I don't want to miss it anymore.

Yours,
Thomian

Album Art Downloader XUI

Reply #2227
Two more script suggestions for classical music lovers:

Thanks, here's a couple of scripts for those: theclassicalshop.boo, hyperionrecords.boo.

Please give them a try and let me know if there's any problems with them.

On an entirely unrelated note, it appears that Album Art Downloader XUI has been nominated as a Sourceforge Project of the Month for December. If anyone fancies voting for it, and has a twitter account(!) the poll is here: vote

Alex

Album Art Downloader XUI

Reply #2228
hi alex
I recently look the website of the program where it's explainded how to use it with MediaMonkey based in a previous post of mine, but you didn't put the correction that I made later:
Post #2149
"Of course I don't mind. But I have to make a make a correction in Paramethers you have to fill with
/ar "%a" /al "%l" /p %p\%l.jpg (if you want to save the cover in the same folder as the .mp3 with the name of the album.jpg) or
/ar "%a" /al "%l" /p %p\folder.jpg (if you want to save the cover as folder.jpg)
A suggestion to embedd the image to the mp3 file you can use the Mediamonkey script Album art Tagger created by Trixmoto or the program Mp3Tag"

Album Art Downloader XUI

Reply #2229
I recently look the website of the program where it's explainded how to use it with MediaMonkey based in a previous post of mine, but you didn't put the correction that I made later

Sorry, I've updated the page now to reflect those corrections and additional information. I prefer to show the full (/artist) style parameter names than the abbreviated (/ar) ones for extra clarity.

Alex

Album Art Downloader XUI

Reply #2230
hi,

i made a script for musicbrainz / coverartarchive. here you can get infos about this: http://musicbrainz.org/doc/Cover_Art_Archive/API

i have no clue how to append the .boo-file, so i post  the code if that's ok. please feel free to edit or comment on it. it's my first attempt so there might be room for optimisation. especially at the error handling.

Code: [Select]
# refs: System.Web.Extensions

import System
import System.Xml
import System.Web.Script.Serialization
import AlbumArtDownloader.Scripts
import util

class Musicbrainz(AlbumArtDownloader.Scripts.IScript):
Name as string:
get: return "Musicbrainz"
Author as string:
get: return "Sebastian Hauser"
Version as string:
get: return "0.1"

def Search(artist as string, album as string, results as IScriptResults):
artist = StripCharacters("&.'\";:?!", artist)
album = StripCharacters("&.'\";:?!", album)

if(artist!= null and album!=null):
encodedArtist = EncodeUrl(artist)
encodedAlbum = EncodeUrl(album)

mbidBaseUrl = "http://www.musicbrainz.org/ws/2/release"
mbidUrl = "${mbidBaseUrl}?query=${encodedAlbum}&artist=${encodedArtist}"
#mbidUrl = "${mbidBaseUrl}?query=dummy&artist=portishead"

picBaseUrl = "http://coverartarchive.org/release"
#picUrl = "${picBaseUrl}/76df3287-6cda-33eb-8e9a-044b5e15ffdd"

scoreThreshold = 70

mbidDoc = System.Xml.XmlDocument()
try:
mbidDoc.Load(mbidUrl)
mbidRoot = mbidDoc.DocumentElement
mbidResultNodes = mbidRoot.GetElementsByTagName("release")

results.EstimatedCount = mbidResultNodes.Count

for node in mbidResultNodes:
if Convert.ToInt32(node.Attributes["ext:score"].Value) > scoreThreshold:
try:
mbid = node.Attributes["id"].Value;
picUrl = "${picBaseUrl}/${mbid}"
#picUrl = "${picBaseUrl}/76df3287-6cda-33eb-8e9a-044b5e15ffdd"

json = JavaScriptSerializer()

jsonDoc = GetPage(picUrl)
jsonResultsRelease = json.Deserialize[of Release](jsonDoc)
infoUrl = jsonResultsRelease.release

jsonResultsNodes = json.Deserialize[of Image](jsonDoc)

for i in jsonResultsNodes.images:
thumbnailUrl = i.thumbnails.small
name = i.types[0]
pictureUrl = i.image
if i.front == true:
coverType = CoverType.Front
elif i.back == true:
coverType = CoverType.Back
else:
coverType = CoverType.Unknown
results.Add(thumbnailUrl, name, infoUrl, -1, -1, pictureUrl, coverType)
except e as System.Net.WebException:
results.EstimatedCount--
except e:
return
else:
#both Parameter album and artist are necessary
results.EstimatedCount = 0;


def RetrieveFullSizeImage(fullSizeCallbackParameter):
return fullSizeCallbackParameter;

class Image:
public images as (Images)

class Images:
public image as String
public thumbnails as Thumbnails
public types as List[String]
public front as bool
public back as bool

class Thumbnails:
public large as String
public small as String

class Release:
public release as String


Album Art Downloader XUI

Reply #2231
Thanks, here's a couple of scripts for those: theclassicalshop.boo, hyperionrecords.boo.

Please give them a try and let me know if there's any problems with them.


Hi Alex,
Both scripts seem to work.
During my tests they showed to be very slow, sometimes with timeout and no results on a single search. I couldn't find a special pattern for these timeouts. Today it worked fine.
Errors might be due to their servers or due to my internet connection.
Yours,
thomian

Album Art Downloader XUI

Reply #2232
i made a script for musicbrainz / coverartarchive.

Nice one, thanks! Sorry it's taken me so long to reply, I've been on holiday. I've uploaded your script as a boo file here: musicbrainz.boo, but having tried it out I wonder if it would be possible to have the name of the result be the artist and album as returned by the musicbrainz query for the release rather than the type of the image (front, back, etc.)? That often makes it quick and easy to see if it's a wrong result, or just a result with some odd alternative cover artwork. For example, if you search for "Muse - Absolution", one of the result that comes back is "AutumnTears - Absolution", but they are both named as "Front" by this script. You mentioned error handling specifically - I don't think there's any problem in that area. Yours is better than most scripts, in fact. AAD will trap unhandled exceptions arising from scripts and just stop the script at that point anyway, and there's rarely anything more useful than that which can be done for recovery by a script!

In any case, are you happy for me to include your script in the installer of future releases of AAD?

Quote from: thomian link=msg=0 date=
Thanks for letting me know. I *think* it was probably a temporary issue; it doesn't seem likely that it would be caused by the script itself. I'll keep an eye on it though.

Alex

Album Art Downloader XUI

Reply #2233
but having tried it out I wonder if it would be possible to have the name of the result be the artist and album as returned by the musicbrainz query for the release
done.

For example, if you search for "Muse - Absolution", one of the result that comes back is "AutumnTears - Absolution", but they are both named as "Front" by this script.
Edited the query-syntax a bit. Now the search results should be a better and quite strict.

In any case, are you happy for me to include your script in the installer of future releases of AAD?
Feel free to include it
Here's the edited code:

Code: [Select]
# refs: System.Web.Extensions

import System
import System.Xml
import System.Web.Script.Serialization
import AlbumArtDownloader.Scripts
import util

class Musicbrainz(AlbumArtDownloader.Scripts.IScript):
Name as string:
get: return "Musicbrainz"
Author as string:
get: return "Sebastian Hauser"
Version as string:
get: return "0.2"

def Search(artist as string, album as string, results as IScriptResults):
artist = StripCharacters("&.'\";:?!", artist)
album = StripCharacters("&.'\";:?!", album)

if(artist!= null and album!=null):
encodedArtist = EncodeUrl(artist)
encodedAlbum = EncodeUrl(album)

mbidBaseUrl = "http://www.musicbrainz.org/ws/2/release"

# fuzzier search
#mbidUrl = "${mbidBaseUrl}?query=dummy&artist=portishead"
#mbidUrl = "${mbidBaseUrl}?query=${encodedAlbum}&artist=${encodedArtist}"

# stricter search
#mbidUrl = "${mbidBaseUrl}?query=%22dummy%22%20AND%20artist:%22portishead%22"
mbidUrl = "${mbidBaseUrl}?query=%22${encodedAlbum}%22%20AND%20artist:%22${encodedArtist}%22"

picBaseUrl = "http://coverartarchive.org/release"
#picUrl = "${picBaseUrl}/76df3287-6cda-33eb-8e9a-044b5e15ffdd"

scoreThreshold = 70

mbidDoc = System.Xml.XmlDocument()
try:
mbidDoc.Load(mbidUrl)
mbidRoot = mbidDoc.DocumentElement
mbidResultNodes = mbidRoot.GetElementsByTagName("release")

results.EstimatedCount = mbidResultNodes.Count

for node in mbidResultNodes:
if Convert.ToInt32(node.Attributes["ext:score"].Value) > scoreThreshold:
try:
mbid = node.Attributes["id"].Value;
mbidArtist = node.Item["artist-credit"]\
.Item["name-credit"]\
.Item["artist"]\
.Item["name"]\
.InnerText
mbidRelease = node.Item["title"].InnerText
picUrl = "${picBaseUrl}/${mbid}"
#picUrl = "${picBaseUrl}/76df3287-6cda-33eb-8e9a-044b5e15ffdd"

json = JavaScriptSerializer()

jsonDoc = GetPage(picUrl)
jsonResultsRelease = json.Deserialize[of Release](jsonDoc)
infoUrl = jsonResultsRelease.release

jsonResultsNodes = json.Deserialize[of Image](jsonDoc)

for i in jsonResultsNodes.images:
thumbnailUrl = i.thumbnails.small
#name = i.types[0]
name = mbidArtist + " - " + mbidRelease
pictureUrl = i.image
if i.front == true:
coverType = CoverType.Front
elif i.back == true:
coverType = CoverType.Back
else:
coverType = CoverType.Unknown
results.Add(thumbnailUrl, name, infoUrl, -1, -1, pictureUrl, coverType)
except e as System.Net.WebException:
results.EstimatedCount--
except e:
return
else:
#both Parameter album and artist are necessary
results.EstimatedCount = 0;


def RetrieveFullSizeImage(fullSizeCallbackParameter):
return fullSizeCallbackParameter;

class Image:
public images as (Images)

class Images:
public image as String
public thumbnails as Thumbnails
public types as List[String]
public front as bool
public back as bool

class Thumbnails:
public large as String
public small as String

class Release:
public release as String

Album Art Downloader XUI

Reply #2234
Made the code a bit cleaner as I saw that I can get the respond from musicbrainz as json too. So there's no need for a json- and a xml-parser at the same time now.

Code: [Select]
# refs: System.Web.Extensions
import System.Collections.Generic
import System.Web.Script.Serialization
import AlbumArtDownloader.Scripts
import util

class Musicbrainz(AlbumArtDownloader.Scripts.IScript):
Name as string:
get: return "Musicbrainz"
Author as string:
get: return "Sebastian Hauser"
Version as string:
get: return "0.3"

def Search(artist as string, album as string, results as IScriptResults):
artist = StripCharacters("&.'\";:?!", artist)
album = StripCharacters("&.'\";:?!", album)

if(artist!= null and album!=null):
mbidBaseUrl = "http://search.musicbrainz.org/ws/2/release/"

#mbidUrl = "${mbidBaseUrl}?fmt=json&query=release:" + EncodeUrl("\"" + dummy + "\" AND artist:\"" + portishead + "\"")
mbidUrl = "${mbidBaseUrl}?fmt=json&query=release:" + EncodeUrl("\"" + album + "\" AND artist:\"" + artist + "\"")

picBaseUrl = "http://coverartarchive.org/release"

scoreThreshold = 70

json = JavaScriptSerializer()

try:
mbidDoc = GetPage(mbidUrl)
mbidResult = json.DeserializeObject(mbidDoc) as Dictionary[of string, object]

results.EstimatedCount = mbidResult["release-list"]["count"]

for release as Dictionary[of string, object] in mbidResult["release-list"]["release"]:
mbid = release["id"]
mbidArtist = release["artist-credit"]["name-credit"][0]["artist"]["name"]
mbidTitle = release["title"]
mbidScore = Convert.ToInt32(release["score"])

if mbidScore > scoreThreshold:
try:
#picUrl = "${picBaseUrl}/76df3287-6cda-33eb-8e9a-044b5e15ffdd"
picUrl = "${picBaseUrl}/${mbid}"

picDoc = GetPage(picUrl)
picResult = json.DeserializeObject(picDoc) as Dictionary[of string, object]

infoUrl = picResult["release"]

for image as Dictionary[of string, object] in picResult["images"]:
thumbnailUrl = image["thumbnails"]["small"]
name = mbidArtist + " - " + mbidTitle
pictureUrl = image["image"]
if image["front"] == true:
coverType = CoverType.Front
elif image["back"] == true:
coverType = CoverType.Back
else:
coverType = CoverType.Unknown
results.Add(thumbnailUrl, name, infoUrl, -1, -1, pictureUrl, coverType)

except e as System.Net.WebException:
results.EstimatedCount--

except e:
return
else:
#both Parameter album and artist are necessary
results.EstimatedCount = 0;


def RetrieveFullSizeImage(fullSizeCallbackParameter):
return fullSizeCallbackParameter;

Album Art Downloader XUI

Reply #2235
Great, that does look nicer, and having the artist and title as the result name is a lot better. I've uploaded the updated script musicbrainz.boo, and it should show up in the "Get more scripts" list now. It will be included in the installer the next time one is built (for the next release).

Thanks again!

Alex

Album Art Downloader XUI

Reply #2236
Hi Alex,

google.boo-script is not working (for me?) in Album Art Downloader XUI (current 0.45). Script version ist 0.13 and thre is no newer version.
Somehow the script seems to find matches (upcounting numbers at the script-tab) but no thumbs are displayed.

I would guess that google changed something, because when I look in the script there "imgrefurl" is after "imgurl" in the regex and in the http-source this is imho the other way around. I tried to build my own regex but I did not suceed. Too basis regex-knwoledge / no dev-environment....

A working google-scipt would be nice since it has the most matches for difficult covers...
Greeting from Germany
Andreas

Album Art Downloader XUI

Reply #2237
google.boo-script is not working (for me?)
Hmm... I've just given it a try here and it seems to be still working fine. Are you sure you haven't got some filters applied that are hiding the results?

Alex

Album Art Downloader XUI

Reply #2238
Hi Alex,

thanks for the really quick response and sorry, it was my fault. I installed album art half a year ago, tagged the first few folders and then first completed my htpc. And therefore forgot the filter settings in the application when resuming a few weeks ago. Cover were filtered as only "front" excluding "unknown". And all google-founds are "unkown"....

But know I know more aboutt boo-scipts, regex,.. ;-)

Again thanks for the support and good / best working cover-tool!
Andreas

Album Art Downloader XUI

Reply #2239
I don't know if this has been answered in the 90 pages before, if so I'm sorry.

When i scan folders with the file browser and it finds embedded album art,
the file browser just shows the first file in that directory (since its just a twodimensional list).

does it still look for all files in that directory or does it stop after it found embedded albumart in the first file?
what happens if the first 5 files have album art and the next 20 in the same directory don't?
(all belonging to the same album)

Album Art Downloader XUI

Reply #2240
does it still look for all files in that directory or does it stop after it found embedded albumart in the first file?
what happens if the first 5 files have album art and the next 20 in the same directory don't?
(all belonging to the same album)

The file browser doesn't search the directory for embedded album art, no. If you have it set to use ID3 tags to get album information then when it reads the tags in a file to get the artist and album title, it will also get the embedded art tag if present. Once an album has been added to the list, no further instances of that album will be added, there's only one entry per album in the list. So, it is only the first file belonging to any given album that matters whether it has album art or not, the others won't make any difference.

Album Art Downloader deals with artwork on a per-album basis. It is not a tool for tag-management; ensuring that all your embedded art tags are consistent with the cover art file for that album is a job for a tag-management or library software, such as Mp3Tag. g.p.m. wrote a nice guide about it earlier: [a href='index.php?act=findpost&pid=740568']Using Album Art Downloader XUI with MediaMonkey[/a]

Album Art Downloader XUI

Reply #2241
I am having a problem with AAD all of a sudden.  I have been using AAD for years without a hitch and now when I start it up I get a blank "Album Art Downloader" window and a blank "check for updates window" that just sit there using 25% cpu (1 core pegged) and ~35 MB ram.  they can be closed normally.  I don't see anything in event viewer.  PC is win 7 ult 64,  amd phenom quad core 3.4 with 8 GB ram.  I have tried re-installing .45 .44 and .43 with the same results.  I am guessing this is a dot net problem of some kind.  I did a fresh install a couple weeks ago but I am pretty sure AAD was working after that.  I used the dot net verifier from here: http://blogs.msdn.com/b/astebner/archive/2...13/8999004.aspx
It didn't find any problems.  Any Ideas?

EDIT:  After using AAD on my laptop I just wanted to note that it does not go through any of the splash screen and script compilation stages,  it just goes straight to the blank window.  I also did a "sfc /scannow" and it didn't find anything.

Album Art Downloader XUI

Reply #2242
I am having a problem with AAD all of a sudden.

That's a weird one, I'm not sure what's going on there. One thing that might be worth trying is resetting the AAD settings by deleting the folder: %LOCALAPPDATA%\AlbumArtDownloader

Alex

Album Art Downloader XUI

Reply #2243
I am having a problem with AAD all of a sudden.

That's a weird one, I'm not sure what's going on there. One thing that might be worth trying is resetting the AAD settings by deleting the folder: %LOCALAPPDATA%\AlbumArtDownloader

Alex


Thanks for the reply Alex.  I have deleted the user folder a couple of times without much effect.  It does get recreated when I try to start AAD.  I also tried AAD under a fresh user and with windows services set back to default.

Album Art Downloader XUI

Reply #2244
Thanks for the reply Alex.  I have deleted the user folder a couple of times without much effect.  It does get recreated when I try to start AAD.  I also tried AAD under a fresh user and with windows services set back to default.

Hmm. After deleting that folder, it should show the splash screen as it recompiles all the scripts again - are you saying it goes straight to the blank search window and update window even with no user data folder? That shouldn't be possible as the code to show the main window only runs after the code to compile the scripts, so either it's looking for and finding its user data folder with the cached compiled scripts and settings somewhere else (no clue how, though!), or it is compiling the scripts, but the splash screen window is invisible. If you check in %LOCALAPPDATA%\AlbumArtDownloader\AlbumArt.exe_Url_<random string>\0.45.0.0\Scripts for a file called boo script cache.dll, that would indicate that it had successfully compiled the scripts.

One test you can do is to run "AlbumArt.exe /?" so that it pops up the command line help window instead of trying to show the main search window or anything. If it can't even show that (which is just a text box in a window), then we know that there isn't likely to be anything wrong with Album Art Downloader itself.

If it can show that window, then from your description it sounds like it may be stalling during the process of checking for updates (as that window was displayed). Interestingly, that window should only be shown at all at startup after it's downloaded and parsed the updates.xml, and only if there is a new version. So if you had v0.45 installed I don't really understand why that window would have been displayed, even blank...

It might be useful to see if other .net applications work, for example Paint .NET or blu (which is also uses WPF like Album Art Downloader does). If either of those don't work either, then something is definitely wrong with your .NET installation. Probably not much that can be done to fix that, although re-installing it might potentially help (On Windows 7: Add/Remove, Turn Windows Features On or Off, then checking or unchecking "Microsoft .NET Framework 3.5.1")

Alex

Album Art Downloader XUI

Reply #2245
I do have "%LOCALAPPDATA%\AlbumArtDownloader\AlbumArt.exe_Url_<random string>\0.45.0.0\Scripts\boo script cache.dll"  it is 68k
If I delete the AlbumArtDownloader folder and restart AAD I get a pause and the folder and script is recreated.  I get no Splash/compiling popup.  the I get the blank "Album Art Downloader" window.  see here:
https://picasaweb.google.com/lh/photo/Q21OH...feat=directlink

I only get the update window on the first run after I delete the AlbumArtDownloader AppData folder

Paint.net works fine (I used it to create that screenshot)
blu does not work.  The app starts and shows in the taskbar but there is no window
running "AlbumArt.exe /?" creates another blank window titled "Album Art Downloader Command Line Parameters"
I have unchecked/reboot/recheck/reboot the dot net 3.5 sp1 in windows features

I just searched for WPF apps not running and someone suggested video drivers.
http://social.msdn.microsoft.com/Forums/en...69-d8313ff30c35
the latest ati drivers are broken for crossfire (dual video card setups) and cause windows explorer to crash over and over.  I have a workaround for this which is to use a different atiumd64.dll than is installed by ATI's dot net 4.0 installer.  see this thread:
http://forums.guru3d.com/showthread.php?t=370721

I am going to try the older 12.7 drivers now

Album Art Downloader XUI

Reply #2246
I do have "%LOCALAPPDATA%\AlbumArtDownloader\AlbumArt.exe_Url_<random string>\0.45.0.0\Scripts\boo script cache.dll"  it is 68k
If I delete the AlbumArtDownloader folder and restart AAD I get a pause and the folder and script is recreated.  I get no Splash/compiling popup.  the I get the blank "Album Art Downloader" window.  see here:
https://picasaweb.google.com/lh/photo/Q21OH...feat=directlink

I only get the update window on the first run after I delete the AlbumArtDownloader AppData folder

Paint.net works fine (I used it to create that screenshot)
blu does not work.  The app starts and shows in the taskbar but there is no window
running "AlbumArt.exe /?" creates another blank window titled "Album Art Downloader Command Line Parameters"
I have unchecked/reboot/recheck/reboot the dot net 3.5 sp1 in windows features

I just searched for WPF apps not running and someone suggested video drivers.
http://social.msdn.microsoft.com/Forums/en...69-d8313ff30c35
the latest ati drivers are broken for crossfire (dual video card setups) and cause windows explorer to crash over and over.  I have a workaround for this which is to use a different atiumd64.dll than is installed by ATI's dot net 4.0 installer.  see this thread:
http://forums.guru3d.com/showthread.php?t=370721

I am going to try the older 12.7 drivers now


The older drivers fixed it!  Thanks Alex for putting me on the right track!  AAD is great!

Album Art Downloader XUI

Reply #2247
The older drivers fixed it!  Thanks Alex for putting me on the right track!  AAD is great!

Oh, well done figuring it out! And thanks for reporting back, it might help anyone else who has the same problem and finds these posts.

Alex

Album Art Downloader XUI

Reply #2248
Question for your guys:

I followed the directions on this page:

http://sourceforge.net/apps/mediawiki/a ... ediaMonkey

and all that happens when I right click on a song and go to tools->albumart is I get a popup textbox titled "Album Art Downloader Command Line Parameters'

Any idea what I'm doing wrong? I filled in all the blanks that were shown on that website but still having this problem.
If I leave the 'parameters' field empty, album art downloader will open but 'artist' and 'album' field aren't populated.

Album Art Downloader XUI

Reply #2249
Any idea what I'm doing wrong?
The parameters are wrong. I'm not sure exactly what you've got wrong about them, but if you look at the first line of the "Album Art Downloader Command Line Parameters" window that opens, it should say something like:

>albumart.exe  /artist "the artist name" /album "the album name" /path "a path to a .jpg file"

Of course, it will be a bit different from that, as that would be a valid set of parameters and would therefore just work without showing that window! By comparing what you see with what it ought to be, you can figure out what's not right about them, I hope. Just below that there will be a line giving the version number, then probably an error message surrounded by **** which might give you another clue.

Alex