duration is a time delta

This commit is contained in:
Christophe Benz 2010-07-10 21:54:39 +02:00
commit b86e9d8a00
7 changed files with 16 additions and 18 deletions

View file

@ -59,7 +59,8 @@ class VideoPage(BasePage):
if m:
day, month, year = [int(s) for s in m.group(1).split('/')]
date = datetime.datetime(year, month, day)
return date, int(m.group(2)) * 60 + int(m.group(3))
duration = datetime.timedelta(minutes=m.group(3), seconds=m.group(2))
return date, duration
else:
return None