Skip to content
Browse files

Add Cover Art to MP3 ID3s

git-svn-id: file:///home/rod/meta/filtered@38 2fc86ef6-2fd0-0310-8665-e8bd34009708
  • Loading branch information...
1 parent f06ac80 commit b261bd41906be3d0fec3a00b626b08fe641d876f @rodbegbie committed Sep 26, 2005
Showing with 8 additions and 4 deletions.
  1. +8 −4 MetaRipper/Util/Convert.py
View
12 MetaRipper/Util/Convert.py
@@ -78,13 +78,10 @@ def convert(flacfile, mp3file):
tag.link(mp3file)
gotMB = False
- gotCover = False
for frame in tag.frames:
if frame.header.id == 'UFID':
gotMB = True
- if frame.header.id == 'APIC':
- gotCover = True
if not gotMB:
try:
@@ -94,8 +91,15 @@ def convert(flacfile, mp3file):
except:
print "failed doing the tagwriting thing:", sys.exc_info()[0]
+ tag.link(mp3file)
+ gotCover = False
+
+ for frame in tag.frames:
+ if frame.header.id == 'APIC':
+ gotCover = True
+
if cover and not gotCover:
tag.link(mp3file)
print "Adding cover to MP3 ID3 tags"
tag.addImage(3, coverfilename, u"cover")
- tag.update()
+ tag.update()

0 comments on commit b261bd4

Please sign in to comment.
Something went wrong with that request. Please try again.