mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-23 13:36:35 +00:00
Log units and number within the try block
This commit is contained in:
parent
bf0dcc631a
commit
a8e7299dbe
@ -326,14 +326,15 @@ def download_media_metadata(media_id):
|
||||
unit = lambda p: str(p[-1]).lower()
|
||||
number = lambda p: int(str(p[-2]), base=10)
|
||||
log.debug(parts)
|
||||
log.debug(unit(parts))
|
||||
try:
|
||||
if 'days' == unit(parts):
|
||||
published_datetime = now + timedelta(days=number(parts))
|
||||
if 'hours' == unit(parts):
|
||||
published_datetime = now + timedelta(hours=number(parts))
|
||||
if 'minutes' == unit(parts):
|
||||
published_datetime = now + timedelta(minutes=number(parts))
|
||||
elif 'hours' == unit(parts):
|
||||
published_datetime = now + timedelta(hours=number(parts))
|
||||
elif 'days' == unit(parts):
|
||||
published_datetime = now + timedelta(days=number(parts))
|
||||
log.debug(unit(parts))
|
||||
log.debug(number(parts))
|
||||
except Exception as ee:
|
||||
log.exception(ee)
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user