I wanted to get Album Art for all of my (newly ripped) songs on my MythTV box.
Thierry has a nice perl script which finds album art on Amazon and automatically downloads it, but unfortunately for me the music plugin for MythTV has upgraded their database schema and the script no longer worked. I am using the trunk SVN code, so it's a bit more up-to-date than the latest packaged release, but this means that scripts designed for the packaged versions may not work. (This specific script had a problem finding the correct directory to store the album art, so all the album art was stored in the root directory, overwriting itself with each album.)
Luckily, I know just enough SQL and Perl to be dangerous, so I whipped up a few changes to his code that fixed my problem (after exploring the new database format). The updated script is here if anybody needs it.
UPDATE: I also added features that allow you to run the script multiple times (if an albumart.jpg file already exists, it will skip that album) and improved the searching (if "album by artist" is not found, it will try searching by "album" name only).
4 Comments
the two sleeps in your script need a ; an the end
Elkin,
Thanks, I added them.
Jay
great tool i’m very impressed, i found mine wouldn’t locate the directory because it was missing the / in between
$filename = “$directory$dirname/albumart.jpg”;
So just add it in
$filename = “$directory/$dirname/albumart.jpg”;
I tried adding the / in the myth setup but that didn’t fix it.
cheers.
I ran into the same problem as Mike, but edited the perl script myself and its going full steam ahead now. Thanks for this.
By the way, it works on the latest Mythbuntu just fine.
Post a Comment