mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-23 21:46:44 +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()
|
unit = lambda p: str(p[-1]).lower()
|
||||||
number = lambda p: int(str(p[-2]), base=10)
|
number = lambda p: int(str(p[-2]), base=10)
|
||||||
log.debug(parts)
|
log.debug(parts)
|
||||||
log.debug(unit(parts))
|
|
||||||
try:
|
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):
|
if 'minutes' == unit(parts):
|
||||||
published_datetime = now + timedelta(minutes=number(parts))
|
published_datetime = now + timedelta(minutes=number(parts))
|
||||||
elif 'hours' == unit(parts):
|
log.debug(unit(parts))
|
||||||
published_datetime = now + timedelta(hours=number(parts))
|
log.debug(number(parts))
|
||||||
elif 'days' == unit(parts):
|
|
||||||
published_datetime = now + timedelta(days=number(parts))
|
|
||||||
except Exception as ee:
|
except Exception as ee:
|
||||||
log.exception(ee)
|
log.exception(ee)
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user