Commits

Travis Shirk  committed 86e3e11

Bug fix

  • Participants
  • Parent commits cc06d3c
  • Branches stable

Comments (0)

Files changed (1)

File src/eyed3/id3/frames.py

     def __init__(self):
         dict.__init__(self)
 
-    ##
-    # Read frames starting from the current read position of the file object.
-    # Returns the amount of padding which occurs after the tag, but before the
-    # audio content.  A return valule of 0 DOES NOT imply an error.
     def parse(self, f, tag_header, extended_header):
+        '''Read frames starting from the current read position of the file
+        object. Returns the amount of padding which occurs after the tag, but
+        before the audio content.  A return valule of 0 does not mean error.'''
         self.clear()
 
         padding_size = 0
         assert(fid[0] == "T" and fid in list(ID3_FRAMES.keys()))
 
         if fid in self:
-            curr = self[fid][0]
-            if isinstance(curr, DateFrame):
-                curr.date = text
-            else:
-                curr.text = text
+            curr = self[fid][0].text = text
         else:
             if fid in DATE_FIDS:
-                self[fid] = DateFrame(date_str=text)
+                self[fid] = DateFrame(fid, date=text)
             else:
                 self[fid] = TextFrame(fid, text=text)