Automatically add the Tag 'Sample Book' when an Amazon sample is added to calibre

This commit is contained in:
Kovid Goyal 2012-04-28 23:49:29 +05:30
parent 2509e6e51f
commit 8a9f82313b

View File

@ -46,7 +46,10 @@ class EXTHHeader(object): # {{{
self.thumbnail_offset, = struct.unpack('>L', content)
elif idx == 501:
# cdetype
pass
if content == b'EBSP':
if not self.mi.tags:
self.mi.tags = []
self.mi.tags.append(_('Sample Book'))
elif idx == 502:
# last update time
pass