Page 2 of 7
Re: Write cover / album art images to MP3s - Win / Mac Python script
Posted: October 2nd, 2008, 9:32 am
by zakharm
stanpete wrote:
Oh, it said "Fetch art from AMZN" right above my error message. Forgot to include it in my post.
And yes, the files had all the important information.
Does this happen on all downloads?
Can you PM me the log (Show output script) of your next try?
Re: Write cover / album art images to MP3s - Win / Mac Python script
Posted: October 2nd, 2008, 11:32 am
by stanpete
Funny, just as I downloaded a couple of ..uhm ubuntu albums... for showing you the output, two
of them seemed to work.
I will send you the output of a broken one though.
st
Re: Write cover / album art images to MP3s - Win / Mac Python script
Posted: October 3rd, 2008, 6:19 am
by stanpete
Just an update...
From what I saw it looks like the script won't work if the files only come with an id3tag version
of 1.something, which probably can't store album art. Has anyone else experienced this ?
st
Re: Write cover / album art images to MP3s - Win / Mac Python script
Posted: October 3rd, 2008, 4:22 pm
by zakharm
stanpete wrote:
Just an update...
From what I saw it looks like the script won't work if the files only come with an id3tag version
of 1.something, which probably can't store album art. Has anyone else experienced this ?
st
I'm going to be releasing an update soon, but in the meantime you can fix this by always saving to ID3 V2.3
change:
tag.update()
to:
tag.update(eyeD3.ID3_V2_3)
This will fix problems with V1 and V2.2 tags and save them as V2.3.
Re: Write cover / album art images to MP3s - Win / Mac Python script
Posted: October 3rd, 2008, 7:35 pm
by zakharm
Updated to v0.2 - 10/3/08
Features:
* Fetch and store album art into MP3 within SABnzbd
* Add MP3s to iTunes (Mac only) *new*
* Remove extra files (.sfv, .nfo, .m3u)
* Fill in empty ID3 tags from Newzbin title *new*
* Fix for MP3s with older ID3 tags *new*
Requirements, install details and script download are here:
http://kins.net/wordpress/2008/09/27/sa ... s-to-mp3s/
Re: Write cover / album art images to MP3s - Win / Mac Python script
Posted: October 4th, 2008, 8:15 am
by zakharm
Thanks, I've updated the code with those path changes.
pair of dimes wrote:
I have a request for you -- could you assign track #s based on filenames? That would be most impressive.
Sure, I'll look into it when I get a chance.
Re: Write cover / album art images to MP3s - Win / Mac Python script
Posted: October 4th, 2008, 3:30 pm
by zakharm
pair of dimes wrote:
Is there any way you could add an option to add to iTunes library even when album artwork was *not* found, rather than aborting?
On line 67 you can change:
Code: Select all
else:
print_debug(filepath, "MISSING ID3 information")
to:
Code: Select all
else:
print_debug(filepath, "MISSING ID3 information")
if ADD_TO_ITUNES:
print "Adding to iTunes"
os.system("osascript '" + ADD_TO_ITUNES_PATH + "' '" + filepath + "' " + REMOVE_MP3_AFTER_ITUNES_ADD)
Re: Write cover / album art images to MP3s - Win / Mac Python script
Posted: October 5th, 2008, 3:28 am
by RXP
Great script, anyway to add itunes support for Windows?
I tried to install it and everytime it runs I just get an error "'python' is not recognized as an internal or external command,
operable program or batch file." from the script log. I've installed Python for Windows, any reason why this is happening? I've also tried putting the python executables/dll's in the Sab directory and still the same issue.
Thanks.
Re: Write cover / album art images to MP3s - Win / Mac Python script
Posted: October 5th, 2008, 6:21 am
by stanpete
Hey,
thank you for the updated script and for correcting the id3 info!
Unfortunately, none of the tracks are beeing added to Itunes even though
it gets started and the script shows "added...".
But this is probably a problem on my side. I tried add2lib a couple of days
before you included it and couldn't get it to work.
I wonder if this has to do with my itunes or something in one of the (two) scripts.
Don't know much about python code or applescript but maybe I figure it out somehow.
Or is there a variable that I have to correct in add2lib that you forgot to mention ?
Doesn't seem plausible though since your script open itunes.
thanks for your script anyway!
st
Re: Write cover / album art images to MP3s - Win / Mac Python script
Posted: October 5th, 2008, 11:14 am
by stanpete
Found one additional problem :-)
When you get a sampler or soundtrack, the script won't work because it looks
for a wrong artist/album/song combination.
Sent you pm.
st
Re: Write cover / album art images to MP3s - Win / Mac Python script
Posted: October 5th, 2008, 5:24 pm
by zakharm
RXP wrote:
Great script, anyway to add itunes support for Windows?
I tried to install it and everytime it runs I just get an error "'python' is not recognized as an internal or external command,
operable program or batch file." from the script log. I've installed Python for Windows, any reason why this is happening? I've also tried putting the python executables/dll's in the Sab directory and still the same issue.
Thanks.
Ah yes, forgot that I had this issue too. Python needs to be added to your Windows path.
In WinXP, Right click My Computer > Properties. Advanced tab > Environment Variables > Highlight PATH > Click EDIT, Go to the end of the contents of Variable Value and add: ;C:\Python25 (don't delete the contents, just append it to the end)
Re: Write cover / album art images to MP3s - Win / Mac Python script
Posted: October 5th, 2008, 5:26 pm
by zakharm
stanpete wrote:
When you get a sampler or soundtrack, the script won't work because it looks
for a wrong artist/album/song combination.
As I've suspected, I'll have to screen for Various Artist (VA) and Soundtracks (OST)
Re: Write cover / album art images to MP3s - Win / Mac Python script
Posted: October 10th, 2008, 8:31 pm
by zakharm
Updated to v0.3 - 10/10/08
Features and changes:
* Fetch and store album art into MP3 within SABnzbd
* Add MP3s to iTunes - Now with Windows support *new* - Windows requires pywin32
* Remove extra files (.sfv, .nfo, .m3u)
* Fill in empty ID3 tags from Newzbin title, including empty track numbers - *new*
* Nested directory structure - Music/Artist/Album *new*
* Configuration now in separate file: waa_conf.py
* Soundtrack support
* Remove comments from ID3 tag
* Update XBMC / Plex library *new*
Requirements, install details and script download are here:
http://kins.net/wordpress/2008/09/27/sa ... s-to-mp3s/
Re: Write cover / album art images to MP3s - Win / Mac Python script
Posted: October 11th, 2008, 6:38 am
by stanpete
Great work. Thank you!
Re: Write cover / album art images to MP3s - Win / Mac Python script
Posted: October 11th, 2008, 9:52 pm
by zakharm
I've made an update on line 80 to fix a bug:
From:
if awsresult != "error":
To:
if awsresult != "error" and os.path.isfile(IMAGE):