если колличество символов в часах два и оно меньше 20 то свигаем время на 30

This commit is contained in:
Alexey Barabanov
2025-11-06 14:28:57 +03:00
parent 38beb3d41c
commit 2eced22c36

View File

@@ -422,7 +422,31 @@ def send_job(data,message):
})
logger.info(f'Shifting the "{data['time_h']}:{data['time_m']}" by {anchorPoint} pixels')
bot.send_message(message.chat.id,f'<b>Сдвигаем</b> "<i>{data['time_h']}:{data['time_m']}</i>" на <b>{anchorPoint}</b> пикседей',parse_mode=['html'])
elif len(data['time_h'])==2 and data['time_h'] < 20:
anchorPoint=[30,0]
payload['assets'].append({
"layerName": "TIME_H",
"property": "transform.anchorPoint",
"type": "data",
"value": anchorPoint
})
payload['assets'].append({
"layerName": "TIME_M",
"property": "transform.anchorPoint",
"type": "data",
"value": anchorPoint
})
payload['assets'].append({
"layerName": "TIME",
"property": "transform.anchorPoint",
"type": "data",
"value": anchorPoint
})
logger.info(f'Shifting the "{data['time_h']}:{data['time_m']}" by {anchorPoint} pixels')
bot.send_message(message.chat.id,f'<b>Сдвигаем</b> "<i>{data['time_h']}:{data['time_m']}</i>" на <b>{anchorPoint}</b> пикседей',parse_mode=['html'])
payload['assets'].append({
"type": "data",
"layerName": "TIME_H",