mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix long standing bug in date shown for kobo books
This commit is contained in:
parent
86298ef50e
commit
0fe81939ea
@ -44,16 +44,17 @@ class Book(MetaInformation):
|
|||||||
self.mime = mime
|
self.mime = mime
|
||||||
|
|
||||||
self.size = size # will be set later if None
|
self.size = size # will be set later if None
|
||||||
try:
|
|
||||||
if ContentType == '6':
|
|
||||||
self.datetime = time.strptime(date, "%Y-%m-%dT%H:%M:%S.%f")
|
|
||||||
else:
|
|
||||||
self.datetime = time.gmtime(os.path.getctime(self.path))
|
|
||||||
except:
|
|
||||||
self.datetime = time.gmtime()
|
|
||||||
|
|
||||||
if thumbnail_name is not None:
|
if ContentType == '6':
|
||||||
self.thumbnail = ImageWrapper(thumbnail_name)
|
self.datetime = time.strptime(date, "%Y-%m-%dT%H:%M:%S.%f")
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
self.datetime = time.gmtime(os.path.getctime(self.path))
|
||||||
|
except:
|
||||||
|
self.datetime = time.gmtime()
|
||||||
|
|
||||||
|
if thumbnail_name is not None:
|
||||||
|
self.thumbnail = ImageWrapper(thumbnail_name)
|
||||||
self.tags = []
|
self.tags = []
|
||||||
if other:
|
if other:
|
||||||
self.smart_update(other)
|
self.smart_update(other)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user