IPB

Welcome Guest ( Log In | Register )

101 Pages V   1 2 3 > »   
Reply to this topicStart new topic
Album Art Downloader XUI, A tool for downloading cover art
AlexVallat
post Sep 9 2007, 09:06
Post #1





Group: Developer
Posts: 1048
Joined: 31-July 06
Member No.: 33465











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)

This post has been edited by AlexVallat: Jun 27 2011, 20:19
Go to the top of the page
+Quote Post
TheTravis
post Sep 9 2007, 10:25
Post #2





Group: Members
Posts: 71
Joined: 10-May 06
Member No.: 30639



First! Finally I got .NET Framework succesfully installed. This program is awesome, thanks!
Go to the top of the page
+Quote Post
Max Spicer
post Sep 9 2007, 18:02
Post #3





Group: Members
Posts: 8
Joined: 9-September 07
Member No.: 46928



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
Go to the top of the page
+Quote Post
AlexVallat
post Sep 9 2007, 18:39
Post #4





Group: Developer
Posts: 1048
Joined: 31-July 06
Member No.: 33465



QUOTE (Max Spicer @ Sep 9 2007, 18:02) *
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
Go to the top of the page
+Quote Post
SmilerSmiles
post Sep 9 2007, 20:42
Post #5





Group: Members
Posts: 89
Joined: 16-October 06
Member No.: 36419



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


--------------------
I love π
Go to the top of the page
+Quote Post
AlexVallat
post Sep 10 2007, 08:36
Post #6





Group: Developer
Posts: 1048
Joined: 31-July 06
Member No.: 33465



QUOTE (SmilerSmiles @ Sep 9 2007, 20:42) *
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
Go to the top of the page
+Quote Post
fooruncle
post Sep 10 2007, 09:47
Post #7





Group: Members
Posts: 47
Joined: 24-September 06
Member No.: 35565



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
Go to the top of the page
+Quote Post
AlexVallat
post Sep 10 2007, 10:47
Post #8





Group: Developer
Posts: 1048
Joined: 31-July 06
Member No.: 33465



QUOTE (fooruncle @ Sep 10 2007, 09:47) *
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
Go to the top of the page
+Quote Post
fooruncle
post Sep 10 2007, 12:34
Post #9





Group: Members
Posts: 47
Joined: 24-September 06
Member No.: 35565



QUOTE (AlexVallat @ Sep 10 2007, 10:47) *
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
Go to the top of the page
+Quote Post
AlexVallat
post Sep 10 2007, 14:29
Post #10





Group: Developer
Posts: 1048
Joined: 31-July 06
Member No.: 33465



QUOTE (fooruncle @ Sep 10 2007, 12:34) *
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
Go to the top of the page
+Quote Post
fooruncle
post Sep 10 2007, 19:09
Post #11





Group: Members
Posts: 47
Joined: 24-September 06
Member No.: 35565



QUOTE (AlexVallat @ Sep 10 2007, 14:29) *
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
Go to the top of the page
+Quote Post
Jojo
post Sep 11 2007, 05:43
Post #12





Group: Members
Posts: 1361
Joined: 25-November 02
Member No.: 3873



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'
Go to the top of the page
+Quote Post
david_dl
post Sep 11 2007, 06:22
Post #13





Group: Members
Posts: 604
Joined: 17-December 05
From: New Zealand
Member No.: 26461



QUOTE (Jojo @ Sep 11 2007, 16:43) *
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

# 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


This post has been edited by david_dl: Sep 11 2007, 06:26
Go to the top of the page
+Quote Post
AlexVallat
post Sep 11 2007, 08:16
Post #14





Group: Developer
Posts: 1048
Joined: 31-July 06
Member No.: 33465



QUOTE (david_dl @ Sep 11 2007, 06:22) *
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
Go to the top of the page
+Quote Post
david_dl
post Sep 11 2007, 10:12
Post #15





Group: Members
Posts: 604
Joined: 17-December 05
From: New Zealand
Member No.: 26461



QUOTE (AlexVallat @ Sep 11 2007, 19:16) *
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.

This post has been edited by david_dl: Sep 11 2007, 10:14
Go to the top of the page
+Quote Post
AlexVallat
post Sep 11 2007, 11:30
Post #16





Group: Developer
Posts: 1048
Joined: 31-July 06
Member No.: 33465



QUOTE (david_dl @ Sep 11 2007, 10:12) *
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
url = System.Text.RegularExpressions.Regex("\\.enc\\.jpg\\?.*").Replace(url, ".jpg")

seems to do the job:

CODE
# 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
Go to the top of the page
+Quote Post
fooruncle
post Sep 11 2007, 12:37
Post #17





Group: Members
Posts: 47
Joined: 24-September 06
Member No.: 35565



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
Go to the top of the page
+Quote Post
AlexVallat
post Sep 11 2007, 13:16
Post #18





Group: Developer
Posts: 1048
Joined: 31-July 06
Member No.: 33465



QUOTE (fooruncle @ Sep 11 2007, 12:37) *
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
Go to the top of the page
+Quote Post
AlexVallat
post Sep 11 2007, 14:57
Post #19





Group: Developer
Posts: 1048
Joined: 31-July 06
Member No.: 33465



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

CODE

# 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
Go to the top of the page
+Quote Post
david_dl
post Sep 12 2007, 01:34
Post #20





Group: Members
Posts: 604
Joined: 17-December 05
From: New Zealand
Member No.: 26461



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.
Go to the top of the page
+Quote Post
AlexVallat
post Sep 12 2007, 08:26
Post #21





Group: Developer
Posts: 1048
Joined: 31-July 06
Member No.: 33465



QUOTE (david_dl @ Sep 12 2007, 01:34) *
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
Go to the top of the page
+Quote Post
david_dl
post Sep 12 2007, 09:42
Post #22





Group: Members
Posts: 604
Joined: 17-December 05
From: New Zealand
Member No.: 26461



QUOTE (AlexVallat @ Sep 12 2007, 19:26) *
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.
Go to the top of the page
+Quote Post
david_dl
post Sep 13 2007, 01:19
Post #23





Group: Members
Posts: 604
Joined: 17-December 05
From: New Zealand
Member No.: 26461



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

CODE
        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")
Go to the top of the page
+Quote Post
phunkydizco
post Sep 13 2007, 19:17
Post #24





Group: Members
Posts: 77
Joined: 13-May 05
Member No.: 22023



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.
Go to the top of the page
+Quote Post
masterrossi
post Sep 13 2007, 19:25
Post #25





Group: Members
Posts: 71
Joined: 18-April 05
Member No.: 21527



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?


--------------------
www.orphax.com
Go to the top of the page
+Quote Post

101 Pages V   1 2 3 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th April 2014 - 13:13