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: iTunes cover art automator? (Read 8741 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

iTunes cover art automator?

Just found out about http://dyn2.uneasysilence.com/coverart/index.php - great quality, but is it possible to make foobar run over all my albums, replacing the current art with ones from there?
err... i'm not using windows any more ;)


iTunes cover art automator?

Reply #2
I got it working with foo_run, if anybody is interested how just ask
err... i'm not using windows any more ;)


iTunes cover art automator?

Reply #4
Well it's complicated, but here we go

http://php.net/ - Download a windows binary for PHP 5, install to C:\php

Download http://www.avantlumiere.com/svn/i7AWF/trunk/i7AWF.php to c:\php\downloadcovers\downloadcover.php

Add this before ?> to it:

Code: [Select]
$i7 = new i7AWF;
if ($argv[1] != 'Music') {
$artist = $argv[1];
$album = $argv[2];
} else {
$artist = $argv[2];
$album = $argv[3];
}
$i7->artist($artist);
$i7->album($album);
echo "About to download...\n";
$url = $i7->payload();
echo "Downloading...\n";
$cover = file_get_contents($url);
if ($cover == '' || !$cover) {
echo "Error!";
$errlog = file_get_contents('downloadcovererrors.txt');
file_put_contents('downloadcovererrors.txt', $errlog . "\nNo cover for $artist - $album");
} else {
echo "Writing...\n";
$file = fopen("D:\Music\\$artist\\$album\cover.jpg", 'w');
fwrite($file, $cover);
fclose($file);
echo "Done!";
}

Change the fopen("D:\Music....") to your directory where your music is. It assumes Artist\Album[\CD <num>] structure, with cover.jpg filenames.

Make a foo_run command, infinite simultanius runs (it only works with this, but jeez if you run it on your entire music collection you'll bring your system down, be warned)

Code: [Select]
C:\php\php.exe C:\php\downloadcovers\downloadcover.php "$directory(%path%,3)" "$directory(%path%,2)" "$directory(%path%,1)"

Make an autoplaylist with all the first tracks of your albums, and do it in sets of albums (to avoid crashing your machine). From now on, to download art, right click the first track, Run -> Cover Downloader (or whatever your named it). It outputs to an error file in its directory if it can't find album art.



EOF
err... i'm not using windows any more ;)


iTunes cover art automator?

Reply #6
http://tom.zickel.org/getartwork/
A great little app (32k) that scans whole directory batches for iTunes covers.
Works great, no options or anything.

iTunes cover art automator?

Reply #7
http://printf.dk/itunes_7_fetching_artwork_for.html

If you'd read my post, you'd see I used the PHP port...
http://tom.zickel.org/getartwork/
A great little app (32k) that scans whole directory batches for iTunes covers.
Works great, no options or anything.

Was it updated for when iTunes disabled downloaing?
Plus, mine doesn't rely on tags.
err... i'm not using windows any more ;)

iTunes cover art automator?

Reply #8

http://tom.zickel.org/getartwork/
A great little app (32k) that scans whole directory batches for iTunes covers.
Works great, no options or anything.

Was it updated for when iTunes disabled downloaing?
Plus, mine doesn't rely on tags.

Yep. I think it was updated just a few days ago. Tried it a few hours ago, and got rather nice results on literally hundreds of subfolders.
Nothing's perfect, though: Various Artists albums output the %1st artistname% - %album%.jpg.

iTunes cover art automator?

Reply #9
http://tom.zickel.org/getartwork/
A great little app (32k) that scans whole directory batches for iTunes covers.
Works great, no options or anything.


How do i get that output format in imageabs2()? This does not work:

$imageabs2(86,86,,,,,$sub(%_width%,87),1,$replace(%path%,%filename_ext%,)%artist% %album%.jpg,)

iTunes cover art automator?

Reply #10
For me the advantage of my script is it's intergrated into foobar. But I can see why people would want a GUI.
err... i'm not using windows any more ;)

iTunes cover art automator?

Reply #11
I would prefer a CLI, but not at the expense of having to run it through PHP or Python.

 

iTunes cover art automator?

Reply #12
I could use one of those PHP to C compilers
err... i'm not using windows any more ;)


iTunes cover art automator?

Reply #14
Elliot, I'm having a problem with your script.

I followed you directions exactly, but nothing happens when I run the command (well almost nothing, a black cli window flashes for a brief second, it has some writing in it but it's gone before I can read it).
No cover art is created.

I replaced the fopen D:\Music\\$artist\\$album\cover.jpg to C:\Documents and Settings\Owner\My Documents\My Music\\$artist\\$album\cover.jpg

When I run C:\php\php.exe C:\php\downloadcovers\downloadcover.php from the command line, I get
Code: [Select]
About to download...

Fatal error: Call to undefined function curl_init() in C:\php\downloadcovers\downloadcover.php on line 36
Is over the of = % over 100

iTunes cover art automator?

Reply #15
Fluffy: Oops, open c:\php\php.ini-dist, change ;extention = php_curl.dll (or similar) to extension = php_curl.dll (just remove the .
err... i'm not using windows any more ;)

iTunes cover art automator?

Reply #16
http://tom.zickel.org/getartwork/
A great little app (32k) that scans whole directory batches for iTunes covers.
Works great, no options or anything.

too bad that it only reads ID3v1 tags
--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'

iTunes cover art automator?

Reply #17
...and only works with MP3s.
err... i'm not using windows any more ;)