Fix timestamp problem
This commit is contained in:
parent
da632631a2
commit
0563194b82
@ -190,7 +190,7 @@ def ReadCommentsMioMio(f, fontsize):
|
||||
c = str(message.childNodes[0].wholeText)
|
||||
pos = 0
|
||||
size = int(message.getAttribute('fontsize'))*fontsize/25.0
|
||||
yield (float(comment.getElementsByTagName('playTime')[0].childNodes[0].wholeText), int(calendar.timegm(time.strptime(comment.getElementsByTagName('times')[0].childNodes[0].wholeText, '%Y-%m-%d %H:%M:%S')))+28800, i, c, {'1': 0, '4': 2, '5': 1}[message.getAttribute('mode')], int(message.getAttribute('color')), size, (c.count('\n')+1)*size, CalculateLength(c)*size)
|
||||
yield (float(comment.getElementsByTagName('playTime')[0].childNodes[0].wholeText), int(calendar.timegm(time.strptime(comment.getElementsByTagName('times')[0].childNodes[0].wholeText, '%Y-%m-%d %H:%M:%S')))-28800, i, c, {'1': 0, '4': 2, '5': 1}[message.getAttribute('mode')], int(message.getAttribute('color')), size, (c.count('\n')+1)*size, CalculateLength(c)*size)
|
||||
i += 1
|
||||
except (AssertionError, AttributeError, IndexError, TypeError, ValueError):
|
||||
logging.warning(_('Invalid comment: %s') % comment.toxml())
|
||||
|
Loading…
Reference in New Issue
Block a user