- def save(self, force_insert=False, force_update=False):
- media = super(BookMedia, self).save(force_insert, force_update)
+ def save(self, *args, **kwargs):
+ super(BookMedia, self).save(*args, **kwargs)
+ extra_info = self.get_extra_info_value()
+ extra_info.update(self.read_meta())
+ self.set_extra_info_value(extra_info)
+ self.source_sha1 = self.read_source_sha1(self.file.path, self.type)
+ print self.extra_info, self.source_sha1
+ return super(BookMedia, self).save(*args, **kwargs)
+
+ def read_meta(self):
+ """
+ Reads some metadata from the audiobook.
+ """
+
+ artist_name = director_name = ''