Write cover album art to MP3s, organize files, iTunes import

Come up with a useful post-processing script? Share it here!
phischi
Newbie
Newbie
Posts: 2
Joined: February 2nd, 2010, 10:57 am

Re: Write cover / album art images to MP3s - Mac Python script / Win EXE now av

Post by phischi »

zakharm wrote: It's a bug.
ok thanx
Ronald Pagan
Newbie
Newbie
Posts: 8
Joined: January 28th, 2010, 12:26 pm

Re: Write cover / album art images to MP3s - Mac Python script / Win EXE now avail

Post by Ronald Pagan »

Having some problems with this script that I never used to have.  Here's a past of the script output

Code: Select all

01-beach_house-zebra.mp3 : artist: Beach House album: Teen Dream
Album art fetch from AMZN: Someablum
02-somealbum
03-somealbum
Error: Directory not empty, cannot remove
Traceback (most recent call last):
  File "write_album_art.py", line 311, in <module>
  File "write_album_art.py", line 273, in do_recurse
  File "write_album_art.py", line 270, in do_recurse
  File "write_album_art.py", line 277, in do_recurse
  File "write_album_art.py", line 154, in read_mp3
  File "shutil.pyc", line 200, in move
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'd:\\shares\\Music\\somealbum.mp3'

Basically sometimes it will process all of the mp3s in an album and other times it will hang on one.  Annoying, don't know why, it says because some other process is using the file. 
zakharm
Release Testers
Release Testers
Posts: 56
Joined: September 29th, 2008, 1:08 pm

Re: Write cover / album art images to MP3s - Mac Python script / Win EXE now avail

Post by zakharm »

Which version of SAB are you on?

I've never had this error with my script, but I've had Windows lock folders on me a good bit.
Write album art post processing script
tafkaj
Newbie
Newbie
Posts: 3
Joined: July 27th, 2009, 5:45 am

Re: Write cover / album art images to MP3s - Mac Python script / Win EXE now av

Post by tafkaj »

Hi zakharm,

I saw your post about python scripts an 10.6 and managed to change path settings in write_album_art.py. The script doesn't break any more now but the only thing it really does reliably is removing the download folder when set in the .ini  ::)
I know its my fault but it seems that I am not able to get the script running:
I still get 'import site' failed; use -v for traceback error although I added the OSX python paths
AWS returns "The request must contain the parameter Signature." ??? (btw do I have to use the key ord id from aws?)
Albums are not Added to iTunes (I tried "add_to_itunes_even_on_cover_fail" since I get an AWS error - I also tried to start addtolib manually once, it wanted to install rosetta!?!)
...
I am getting more and more desperate - is there a chance you provide an updated (Snow Leopard) version of your script?  ;)

TIA Jakob
Last edited by tafkaj on February 10th, 2010, 7:12 am, edited 1 time in total.
zakharm
Release Testers
Release Testers
Posts: 56
Joined: September 29th, 2008, 1:08 pm

Re: Write cover / album art images to MP3s - Mac Python script / Win EXE now avail

Post by zakharm »

I do have an updated version if anyone wants to beta test it.  PM me.
Write album art post processing script
tafkaj
Newbie
Newbie
Posts: 3
Joined: July 27th, 2009, 5:45 am

Re: Write cover / album art images to MP3s - Mac Python script / Win EXE now av

Post by tafkaj »

You got mail.
Thanks for the script - it seems to work really good. The only issue so far is that I can't get addtolib.app working. Are you sure that addtolib.app (from 2004) works with the latest OSX and iTunes versions? Any idea how I can debug this - there are no error msgs coming from the app...

TIA
Last edited by tafkaj on February 11th, 2010, 1:56 pm, edited 1 time in total.
joebrady
Newbie
Newbie
Posts: 3
Joined: October 30th, 2009, 9:08 am

Re: Write cover / album art images to MP3s - Mac Python script / Win EXE now avail

Post by joebrady »

I also see the error about "The request must contain the parameter Signature.".  And also  "Cannot reach XBMC"
soopahfly
Newbie
Newbie
Posts: 5
Joined: September 7th, 2010, 5:41 am
Location: Sheffield

Re: Write cover / album art images to MP3s - Mac Python script / Win EXE now avail

Post by soopahfly »

I can't get this script to rename the folder/files, despite setting the options in the config file to "True"

It embeds the Album Art OK though.
zakharm
Release Testers
Release Testers
Posts: 56
Joined: September 29th, 2008, 1:08 pm

Re: Write cover / album art images to MP3s - Mac Python script / Win EXE now avail

Post by zakharm »

Updated to v0.6 - 10/15/2010
I haven't had a chance to keep up with the script, but here is the latest version I created a while back.

You're going to need your AMZN AWS Key and also a secondary AWS Secret Key that you can find in your Amazon Web Services Account to run the source.

Please see the first post for download links.
Write album art post processing script
Dipstick
Newbie
Newbie
Posts: 4
Joined: September 22nd, 2008, 5:23 pm

Re: Write cover / album art images to MP3s - Mac Python script / Win EXE now avail

Post by Dipstick »

Hi,
Has anyone tried messing with the mac version to get it to work on Linux (Ubuntu)?

Is there any reason why it wouldn't run on linux?
cheers

dipstick
zakharm
Release Testers
Release Testers
Posts: 56
Joined: September 29th, 2008, 1:08 pm

Re: Write cover / album art images to MP3s - Mac Python script / Win EXE now avail

Post by zakharm »

Dipstick wrote:Is there any reason why it wouldn't run on linux?
The script should work except for the iTunes integration.
Write album art post processing script
flips
Newbie
Newbie
Posts: 15
Joined: December 19th, 2010, 9:14 am

Re: Write cover / album art images to MP3s - Mac Python script / Win EXE now avail

Post by flips »

Great plugin!

One issue I'm having is that the files don't move into a folder based on the file artist and album name like the ini file infers.
#Removes original "ARTIST - ALBUM (YEAR)" folder and makes: [MUSIC Root]\[ARTIST]\[ALBUM]

The folder created is just the name of the nzb file, but if I set clean_dir_struct to True then it creates the indented directory structure.

I would rather have  "ARTIST - ALBUM (YEAR)", than the indented structure.  Is there anything special I need to do.  It seems like this is the default behavior, but not for me.

Thanks,
flips
zakharm
Release Testers
Release Testers
Posts: 56
Joined: September 29th, 2008, 1:08 pm

Re: Write cover / album art images to MP3s - Mac Python script / Win EXE now avail

Post by zakharm »

If I remember correctly I think you'll have to go into the python code and change it.
Write album art post processing script
flips
Newbie
Newbie
Posts: 15
Joined: December 19th, 2010, 9:14 am

Re: Write cover / album art images to MP3s - Mac Python script / Win EXE now avail

Post by flips »

Ah.  Okay...  Never coded in python before, but looking through the code I think I can set clean_dir_struct True and then change this line:

NEW_MUSIC_PATH = os.path.join(os.path.join(music_root, artist), album)

I don't really need the year (not sure how you would get that from amazon anyway) so can I just do something like this to get Artist - Album?

NEW_MUSIC_PATH = os.path.join(music_root, artist, , " - ", album)   

Thanks,
flips
zakharm
Release Testers
Release Testers
Posts: 56
Joined: September 29th, 2008, 1:08 pm

Re: Write cover / album art images to MP3s - Mac Python script / Win EXE now avail

Post by zakharm »

Each parameter you add to os.path.join adds a separator which you don't want.

So if you want [MUSIC_ROOT]\[ARTIST - ALBUM] I believe it would be like this:
NEW_MUSIC_PATH = os.path.join(music_root, artist + " - " + album)
Write album art post processing script
Post Reply