Commits

Travis Shirk  committed b0b2c5f
  • Participants
  • Parent commits c987516

Comments (0)

Files changed (2)

File src/eyed3/id3/frames.py

 
         for n in self.times + self.offsets:
             if n is not None:
-                data += dec2bytes(n)
+                data += dec2bytes(n, 32)
             else:
                 data += b'\xff\xff\xff\xff'
 
         for f in self.sub_frames.getAllFrames():
+            f.header = FrameHeader(f.id, self.header.version)
             data += f.render()
 
+        self.data = data
         return super(ChapterFrame, self).render()
 
     @property
 
     @subtitle.setter
     def subtitle(self, subtitle):
-        self.sub_frames.setTextFrame(TITLE_FID, subtitle)
+        self.sub_frames.setTextFrame(SUBTITLE_FID, subtitle)
 
 
 class FrameSet(dict):

File src/eyed3/id3/tag.py

             if chap.element_id == element_id:
                 # update
                 chap.times, chap.offsets = times, offsets
-                chap.sub_frames = sub_frames
+                if sub_frames:
+                    chap.sub_frames = sub_frames
                 return chap
 
         chap = frames.ChapterFrame(element_id=element_id,
                                    times=times, offsets=offsets,
-                                   sub_frames=sub_frames or [])
+                                   sub_frames=sub_frames)
         self._fs[frames.CHAPTER_FID] = chap
         return chap