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 2231181 times) previous topic - next topic
0 Members and 5 Guests are viewing this topic.

Album Art Downloader XUI


[blockquote]





[/blockquote]
AlbumArtDownloader XUI - You know you want it...

This project is a rewrite of the Album Art Downloader code, using .NET Framework 3.5.

Features:
  • Dynamically resizeable thumbnails
  • Thumbnail information
  • Sort by Name, Size, Source, Type, and Page
  • Filter results under or over a specified size, or by type (front, back, etc.), or by maximum results for each source
  • Substitution syntax path to save images
  • Local files search that matches save pattern
  • Enable or disable scripts from the command line
  • New strongly typed interface-based script model; write compiled scripts in any .net language
  • Backwards compatible with existing scripts
  • Backwards compatible with existing command line parameters, including old CoverDownloader parameters.
  • Analyse files to find Artists and Albums from tags, and check if album art is already present.
  • Analyse folder and file names to find Artist and Album names based on a path pattern, and check for album art.
  • Read your foobar2000 media library or playlists to find Artists and Albums, and check for album art.
  • Checks for existing album art embedded in file tags.
  • Queue up multiple searches to occur sequentially.
  • Automatically download album art that matches set criteria for several albums as a batch.
  • Show previews windows to compare art side by side, zooming and panning to check details.
  • Many, many scripts included. (I would seriously not recommend using all of them at once, choose the ones that suit you best.)
  • Prioritised searching - can set some sources to always search, and some to only search if the first ones didn't find anything.
For the graphically-minded out there, although this app isn't skinnable, the UI is all created in XAML, so if you want to grab the source and start editing the UI, please feel free. It is under the XUI folder in the SVN Repository

Links:
SourceForge project page
Wiki and reference guide (incomplete)
Donations

Download:
AlbumArtDownloaderXUI.exe (Installer. Recommended)
AlbumArtDownloaderXUI.zip (zip archive for those who don't like installers)
.NET Framework 3.5 SP1 (required, except for Windows 7)

Album Art Downloader XUI

Reply #1
First! Finally I got .NET Framework succesfully installed. This program is awesome, thanks!

Album Art Downloader XUI

Reply #2
Does Album Art Downloader XUI only work with mp3s?  I tried pointing the file browser at my collection of flac files and it didn't find any albums.

Thanks,

Max

Album Art Downloader XUI

Reply #3
Does Album Art Downloader XUI only work with mp3s?  I tried pointing the file browser at my collection of flac files and it didn't find any albums.

Thanks,

Max

The file browser uses MediaInfo to read file tags. I don't think it supports album and artist information in flac (in fact I didn't think flac supported those sorts of tag at all), but if you want to request support for reading a file format, that's the project to ask. If the stand-alone MediaInfo app can read the tags, but Album Art Downloader doesn't, then that's a bug of mine - if you give me a sample file I can try and fix it.

Alex

Album Art Downloader XUI

Reply #4
Does it handle more than 50 albums at a time yet?
I love π

Album Art Downloader XUI

Reply #5
Does it handle more than 50 albums at a time yet?

I've still got the warning to enqueue only 50 searches at a time in there, but it is handling them much better now. I tried enqueueing all 250-odd albums I have and it was only unresponsive for about 4-5 seconds while they were being queued up, and fine after that. Cancel All took another 5 seconds or so. Of course, it will depend on your PC, but I'd suggest giving it another go and seeing if you find it acceptable.

Alex

Album Art Downloader XUI

Reply #6
Hi,

I still use the old version on my old notebook for performance reasons. I hadn't used it for some weeks, and yesterday the discogs script failed with the following warning:

Retrieving Art Failed
Capacity must be positive
parameter name: capacity

I thought that the script was outdated, so i copied the discogs-script from the .zip of the XUI-version. It compiled without problems, but I still get the same error message.

Can anyone help me?

Thanks,
frncle

Album Art Downloader XUI

Reply #7
Hi,

I still use the old version on my old notebook for performance reasons. I hadn't used it for some weeks, and yesterday the discogs script failed with the following warning:

Retrieving Art Failed
Capacity must be positive
parameter name: capacity

I thought that the script was outdated, so i copied the discogs-script from the .zip of the XUI-version. It compiled without problems, but I still get the same error message.

Can anyone help me?

Thanks,
frncle

Discogs script seems to be working fine for me. Can you post the artist and album you searched for?

Alex

Album Art Downloader XUI

Reply #8
Discogs script seems to be working fine for me. Can you post the artist and album you searched for?

Alex


I tried it with several CDs and records I ripped last week. Some examples are:

Company Flow - End to End Burners
D'Nell - 1st Magic
Peeping Tom - Peeping Tom

The preview pictures do appear, but as soon as I try to preview or save them, I get the error message (or a connection time out in some cases...). Amazon works perfectly...

frncle

Album Art Downloader XUI

Reply #9
The preview pictures do appear, but as soon as I try to preview or save them, I get the error message (or a connection time out in some cases...). Amazon works perfectly...

frncle


I tried the searches you mentioned, and they seem to be working fine for me too. As you say that the results are actually returned, it is just the full size downloads which don't, I suspect that the problem is a bug with the old Album Art Downloader you are using. The discogs script doesn't actually have smaller thumbnails available, it uses the same image for both thumbnail and full size, so if it can show the thumbnail, then it should have the full size one available too.

You could try using the XUI one and seeing if the same problem occurs with that. I'm afraid I'm not going to be investigating or fixing bugs in the old version, though.

Alex

Album Art Downloader XUI

Reply #10
You could try using the XUI one and seeing if the same problem occurs with that. I'm afraid I'm not going to be investigating or fixing bugs in the old version, though.


Hmmm, the script definitly worked several weeks before... However, I completely reinstalled the old version and it works now... Whatever happened, I can't explain it. The only possibility I see is that I returned to an old version of the old version when I had to reinstall my pc with an old backup of the system partition last month. I can't verify that now. Thanks for your help! I really love your program!

frncle

Album Art Downloader XUI

Reply #11
can this be used with iTunes? http://www.thejosher.net/iTunes/
--alt-presets are there for a reason! These other switches DO NOT work better than it, trust me on this.
LAME + Joint Stereo doesn't destroy 'Stereo'

Album Art Downloader XUI

Reply #12
can this be used with iTunes? http://www.thejosher.net/iTunes/

Hmm, it looks like unencrypted iTMS art is available, wonderful. There's a script included with my original 'CoverDownloader' for iTMS, i'll try and convert it. I don't know if it will still work with the XUI version, i haven't been keeping up with the changes.

Edit: Arggh, this 'josh' guy hasn't provided updated source code (that I can see). But from his description the changes necessary shouldn't be too difficult. Here's the original code if anyone wants to try.

Note: THIS CODE DOESN'T WORK, ONLY USE IT IF YOU INTEND TO FIX IT. Also the script itself's probably not compatible with Alex's modifications, any changes necessary should be slight.

Code: [Select]
# refs: ICSharpCode.SharpZipLib.dll System.Windows.Forms
namespace CoverSources
import System.Xml
import System.Drawing
import util
import ICSharpCode.SharpZipLib

class iTMS:
static def GetPageSecret(url as string):
request as System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url)
request.UserAgent="iTunes/7.0 (Macintosh; U; PPC Mac OS X 10.4.7)"
request.Headers.Add("X-Apple-Tz","7200")
request.Headers.Add("X-Apple-Store-Front","143457")
request.Headers.Add("Accept-Language","en-us, en;q=0.50")
request.Headers.Add("Accept-Encoding","gzip, x-aes-cbc")
response = request.GetResponse()
return response.GetResponseStream()
static SourceName as string:
get: return "iTunes Music Store"
static SourceVersion as decimal:
get: return 0.1
static def GetThumbs(coverart,artist,album):
x=System.Xml.XmlDocument()
t=GetPageSecret("http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZSearch.woa/wa/coverArtMatch?an="+EncodeUrl(artist)+"&pn="+EncodeUrl(album))
x.Load(ICSharpCode.SharpZipLib.GZip.GZipInputStream(t))
tags=x.GetElementsByTagName("dict")
if tags.Count==0:
return
url=""
albumname=album
for tag in tags[0].ChildNodes:
if tag.InnerText=="cover-art-url":
url=tag.NextSibling.InnerText
if tag.InnerText=="playlistName":
albumname=tag.NextSibling.InnerText
if url.Length>0:
coverart.SetCountEstimate(1)
coverart.AddThumb(GetPageSecret(url),albumname,600,600,null)
static def GetResult(param):
return null

Album Art Downloader XUI

Reply #13
Also the script itself's probably not compatible with Alex's modifications, any changes necessary should be slight.
XUI should be backwards compatible with old scripts. Looking at this one, the only difficulty with it I see is that it needs a reference to ICSharpCode.SharpZipLib.dll, which is not included with Album Art Downloader. If you download that dll and stick it (the net-20 version) in your Album Art Downloader XUI folder, it will compile and run just fine.

It won't actually download any art, though, unfortunately. However, trying a few searches on http://www.thejosher.net/iTunes/, including his example, shows that he can't download any art either:
Quote
Warning: gzinflate() [function.gzinflate]: data error in /home/josh/public_html/iTunes/index.php on line 122
Oh well.

Alex

Album Art Downloader XUI

Reply #14
It won't actually download any art, though, unfortunately. However, trying a few searches on http://www.thejosher.net/iTunes/, including his example, shows that he can't download any art either:
Quote
Warning: gzinflate() [function.gzinflate]: data error in /home/josh/public_html/iTunes/index.php on line 122
Oh well.

Alex


That's rather odd, his script works fine for me. What country are you in? Is there an iTMS in your country? Maybe that's the problem, we recently got iTMS here in New Zealand. Does this link work for you?  http://a1.phobos.apple.com/r10/Music/32/a3...zi.dbjwyonx.jpg
For me it only works in firefox, for some reason. BTW the quality is amazing, better than I've seen from any other source, it's definately not a scan.

Edit: Noticed that the problem you quoted occurred on his webserver, so country shouldn't affect it, still, odd that it's working perfectly here.

Album Art Downloader XUI

Reply #15
That's rather odd, his script works fine for me. What country are you in? Is there an iTMS in your country? Maybe that's the problem, we recently got iTMS here in New Zealand. Does this link work for you?  http://a1.phobos.apple.com/r10/Music/32/a3...zi.dbjwyonx.jpg
For me it only works in firefox, for some reason. BTW the quality is amazing, better than I've seen from any other source, it's definately not a scan.

Edit: Noticed that the problem you quoted occurred on his webserver, so country shouldn't affect it, still, odd that it's working perfectly here.
Well, his webserver script is up and running again for me, so must have been some sort of temporary glitch. The problem is that the boo script is still downloading the encrypted version. I can't see any source code for what Josh has done at all, but a guess at just removing the .enc.jpg?... bit by adding the line:
Code: [Select]
url = System.Text.RegularExpressions.Regex("\\.enc\\.jpg\\?.*").Replace(url, ".jpg")
seems to do the job:

Code: [Select]
# refs: ICSharpCode.SharpZipLib.dll System.Windows.Forms
namespace CoverSources
import System.Xml
import System.Drawing
import util

class iTMS:
static def GetPageSecret(url as string):
request as System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url)
request.UserAgent="iTunes/7.0 (Macintosh; U; PPC Mac OS X 10.4.7)"
request.Headers.Add("X-Apple-Tz","7200")
request.Headers.Add("X-Apple-Store-Front","143457")
request.Headers.Add("Accept-Language","en-us, en;q=0.50")
request.Headers.Add("Accept-Encoding","gzip, x-aes-cbc")
response = request.GetResponse()
return response.GetResponseStream()
static SourceName as string:
get: return "iTunes Music Store"
static SourceVersion as decimal:
get: return 0.2
static def GetThumbs(coverart,artist,album):
x=System.Xml.XmlDocument()
t=GetPageSecret("http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZSearch.woa/wa/coverArtMatch?an="+EncodeUrl(artist)+"&pn="+EncodeUrl(album))
x.Load(ICSharpCode.SharpZipLib.GZip.GZipInputStream(t))
tags=x.GetElementsByTagName("dict")
if tags.Count==0:
return
url=""
albumname=album
for tag in tags[0].ChildNodes:
if tag.InnerText=="cover-art-url":
url=tag.NextSibling.InnerText
if tag.InnerText=="playlistName":
albumname=tag.NextSibling.InnerText
if url.Length>0:
url = System.Text.RegularExpressions.Regex("\\.enc\\.jpg\\?.*").Replace(url, ".jpg")
coverart.SetCountEstimate(1)
coverart.AddThumb(url,albumname,-1,-1,null)
static def GetResult(param):
return null

Album Art Downloader XUI

Reply #16
Hmmm, using it with the old version (again...), I get the following message in the iTMS column:
Error GZIP header, first magic byte doesn't match...

Too bad...
frncle

Album Art Downloader XUI

Reply #17
Hmmm, using it with the old version (again...), I get the following message in the iTMS column:
Error GZIP header, first magic byte doesn't match...

Too bad...
frncle

Again, you've got to post the thing you're searching for to make any meaningful error report! Some quick testing shows that this error will be reported by the old Album Art Downloader if the album art can't be found on iTMS. If you get a result where searching on Josh's site returns a result, but the boo script doesn't, then I can look into that.

As a more general improvement, the script should probably handle the "no result" case in a more graceful way. Also, worth noting that the script as stands does not do thumbnails, although Josh's site does. Room for improvement here. If I get round to it, I might try writing a new iTMS script based off the information in this script, but until then, this one does mostly work.

Alex

Album Art Downloader XUI

Reply #18
Turns out, adding thumbnail support only needs a small tweak after all:

Code: [Select]
# refs: ICSharpCode.SharpZipLib.dll
namespace CoverSources
import System.Xml
import System.Drawing
import util

class iTMS:
static def GetPageSecret(url as string):
request as System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url)
request.UserAgent="iTunes/7.0 (Macintosh; U; PPC Mac OS X 10.4.7)"
request.Headers.Add("X-Apple-Tz","7200")
request.Headers.Add("X-Apple-Store-Front","143457")
request.Headers.Add("Accept-Language","en-us, en;q=0.50")
request.Headers.Add("Accept-Encoding","gzip, x-aes-cbc")
response = request.GetResponse()
return response.GetResponseStream()
static SourceName as string:
get: return "iTunes Music Store"
static SourceVersion as string:
get: return "0.3"
static SourceCreator as string:
get: return "david_dl, Alex Vallat"
static def GetThumbs(coverart,artist,album):
x=System.Xml.XmlDocument()
t=GetPageSecret("http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZSearch.woa/wa/coverArtMatch?an="+EncodeUrl(artist)+"&pn="+EncodeUrl(album))
try:
x.Load(ICSharpCode.SharpZipLib.GZip.GZipInputStream(t))
except e as ICSharpCode.SharpZipLib.GZip.GZipException:
return //Wasn't a zip, so art wasn't found

tags=x.GetElementsByTagName("dict")
if tags.Count==0:
return
url=""
albumname=album
for tag in tags[0].ChildNodes:
if tag.InnerText=="cover-art-url":
url=tag.NextSibling.InnerText
if tag.InnerText=="playlistName":
albumname=tag.NextSibling.InnerText
if url.Length>0:
url = System.Text.RegularExpressions.Regex("\\.enc\\.jpg\\?.*").Replace(url, "")
coverart.SetCountEstimate(1)
coverart.AddThumb(url + ".170x170-75.jpg", albumname, -1, -1, url + ".jpg")
static def GetResult(param):
return param

I'll add this to the XUI installer along with the SharpZipLib dll and bump the version to 0.9.1

Alex

Album Art Downloader XUI

Reply #19
Thanks, it seems to work for most albums, however if I search artist: Menomena, album: Friend and foe, it saves the thumbnail version, not the full-sized art. The same search works correctly on thejosher.net.

Album Art Downloader XUI

Reply #20
Thanks, it seems to work for most albums, however if I search artist: Menomena, album: Friend and foe, it saves the thumbnail version, not the full-sized art. The same search works correctly on thejosher.net.

Strange, thanks for pointing it out. The result returned from http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZSearch.woa/wa/coverArtMatch?... gives a url of http://a1.phobos.apple.com/r40/Music/1d/68/3f/mzi.xoairpuj.enc.jpg.... This seems to have a thumbnail available, but no full size, at least not at http://a1.phobos.apple.com/r40/Music/1d/68/3f/mzi.xoairpuj.jpg.

Josh's site returns a result of http://a1.phobos.apple.com/r10/Music/32/a3/53/mzi.dbjwyonx.enc.jpg... for exactly the same "Menomena / Friend and foe" search. Without being able to see his source code (in particular the original query he uses), I have no idea why he receives a different result.

I suppose we could always use him as a middle-man, and do the searches through his site and grab the images off that, although I'd prefer not to.

Alex

Album Art Downloader XUI

Reply #21
I suppose we could always use him as a middle-man, and do the searches through his site and grab the images off that, although I'd prefer not to.
Alex


I've emailed him requesting his source code/how he obtains the URL.

Album Art Downloader XUI

Reply #22
A few changes to the headers sent in the initial request seem to make all the difference:

Code: [Select]
        request.UserAgent="iTunes/7.4 (Macintosh; U; PPC Mac OS X 10.4.7)"
        request.Headers.Add("X-Apple-Tz","-21600")
        request.Headers.Add("X-Apple-Store-Front","143441")
        request.Headers.Add("Accept-Language","en-us, en;q=0.50")
        request.Headers.Add("Accept-Encoding","gzip, x-aes-cbc")

Album Art Downloader XUI

Reply #23
Performance of the new version is really great. Good work.

What do you think about a context menu item for windows explorer? I organize my library with windows explorer and use the following structure: Artist/(Year) Album. It would be great to start aad with the right parameters by clicking on the album folder.

Album Art Downloader XUI

Reply #24
I have the album art in the folders of my albums. How can I search those for artwork with the foobar browser and how can I save them in those folders?